[IR] Support specifying kdocs for properties in IR tree generator
This commit is contained in:
committed by
Space Team
parent
b3e5612f79
commit
396451b5da
+2
@@ -91,6 +91,8 @@ sealed class FieldConfig(
|
|||||||
var printProperty = true
|
var printProperty = true
|
||||||
var strictCastInTransformChildren = false
|
var strictCastInTransformChildren = false
|
||||||
|
|
||||||
|
var kdoc: String? = null
|
||||||
|
|
||||||
var generationCallback: (PropertySpec.Builder.() -> Unit)? = null
|
var generationCallback: (PropertySpec.Builder.() -> Unit)? = null
|
||||||
|
|
||||||
override fun toString() = name
|
override fun toString() = name
|
||||||
|
|||||||
+2
@@ -84,6 +84,8 @@ sealed class Field(
|
|||||||
var needsDescriptorApiAnnotation = false
|
var needsDescriptorApiAnnotation = false
|
||||||
abstract val transformable: Boolean
|
abstract val transformable: Boolean
|
||||||
|
|
||||||
|
val kdoc = config?.kdoc
|
||||||
|
|
||||||
val printProperty = config?.printProperty ?: true
|
val printProperty = config?.printProperty ?: true
|
||||||
val generationCallback = config?.generationCallback
|
val generationCallback = config?.generationCallback
|
||||||
|
|
||||||
|
|||||||
+4
@@ -67,6 +67,10 @@ fun printElements(generationPath: File, model: Model) = sequence {
|
|||||||
addAnnotation(descriptorApiAnnotation)
|
addAnnotation(descriptorApiAnnotation)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
field.kdoc?.let {
|
||||||
|
addKdoc(it)
|
||||||
|
}
|
||||||
|
|
||||||
field.generationCallback?.invoke(this)
|
field.generationCallback?.invoke(this)
|
||||||
}.build())
|
}.build())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user