[Gradle] Remove DefaultValues.prettyDefaultValue in favor of stripping OPTIONS_PACKAGE_PREFIX
KTIJ-24976
This commit is contained in:
committed by
Space Team
parent
f57d0393e5
commit
1bbd135de8
@@ -24,7 +24,6 @@ open class DefaultValues(
|
||||
val defaultValue: String,
|
||||
val type: KType,
|
||||
val kotlinOptionsType: KType,
|
||||
val prettyDefaultValue: String? = null,
|
||||
val possibleValues: List<String>? = null,
|
||||
val fromKotlinOptionConverterProp: String? = null,
|
||||
val toKotlinOptionConverterProp: String? = null,
|
||||
@@ -89,7 +88,6 @@ open class DefaultValues(
|
||||
toKotlinOptionConverterProp = """
|
||||
this.target
|
||||
""".trimIndent(),
|
||||
prettyDefaultValue = "\"${JvmTarget.DEFAULT}\""
|
||||
)
|
||||
|
||||
object JsEcmaVersions : DefaultValues(
|
||||
|
||||
@@ -878,14 +878,14 @@ private fun Printer.generateOptionDeprecation(property: KProperty1<*, *>) {
|
||||
private fun Printer.generateDoc(property: KProperty1<*, *>) {
|
||||
val description = property.findAnnotation<Argument>()!!.description
|
||||
val possibleValues = property.gradleValues.possibleValues
|
||||
val defaultValue = property.gradleValues.prettyDefaultValue ?: property.gradleValues.defaultValue
|
||||
val defaultValue = property.gradleValues.defaultValue
|
||||
|
||||
println("/**")
|
||||
println(" * ${description.replace("\n", " ")}")
|
||||
if (possibleValues != null) {
|
||||
println(" * Possible values: ${possibleValues.joinToString()}")
|
||||
}
|
||||
println(" * Default value: $defaultValue")
|
||||
println(" * Default value: ${defaultValue.removePrefix("$OPTIONS_PACKAGE_PREFIX.")}")
|
||||
println(" */")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user