[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(" */")
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
/**
|
||||
* Define whether the `main` function should be called upon execution
|
||||
* Possible values: "call", "noCall"
|
||||
* Default value: org.jetbrains.kotlin.gradle.dsl.JsMainFunctionExecutionMode.CALL
|
||||
* Default value: JsMainFunctionExecutionMode.CALL
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
val main: org.gradle.api.provider.Property<org.jetbrains.kotlin.gradle.dsl.JsMainFunctionExecutionMode>
|
||||
@@ -32,7 +32,7 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
/**
|
||||
* Kind of the JS module generated by the compiler
|
||||
* Possible values: "plain", "amd", "commonjs", "umd"
|
||||
* Default value: org.jetbrains.kotlin.gradle.dsl.JsModuleKind.MODULE_PLAIN
|
||||
* Default value: JsModuleKind.MODULE_PLAIN
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
val moduleKind: org.gradle.api.provider.Property<org.jetbrains.kotlin.gradle.dsl.JsModuleKind>
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
/**
|
||||
* Define whether the `main` function should be called upon execution
|
||||
* Possible values: "call", "noCall"
|
||||
* Default value: org.jetbrains.kotlin.gradle.dsl.JsMainFunctionExecutionMode.CALL
|
||||
* Default value: JsMainFunctionExecutionMode.CALL
|
||||
*/
|
||||
var main: kotlin.String
|
||||
get() = options.main.get().mainKotlinOption
|
||||
@@ -44,7 +44,7 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
/**
|
||||
* Kind of the JS module generated by the compiler
|
||||
* Possible values: "plain", "amd", "commonjs", "umd"
|
||||
* Default value: org.jetbrains.kotlin.gradle.dsl.JsModuleKind.MODULE_PLAIN
|
||||
* Default value: JsModuleKind.MODULE_PLAIN
|
||||
*/
|
||||
var moduleKind: kotlin.String
|
||||
get() = options.moduleKind.get().moduleKindKotlinOption
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ interface KotlinJvmCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommo
|
||||
/**
|
||||
* Target version of the generated JVM bytecode (1.8, 9, 10, ..., 20), default is 1.8
|
||||
* Possible values: "1.8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"
|
||||
* Default value: "1.8"
|
||||
* Default value: JvmTarget.DEFAULT
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
val jvmTarget: org.gradle.api.provider.Property<org.jetbrains.kotlin.gradle.dsl.JvmTarget>
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ interface KotlinJvmOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
/**
|
||||
* Target version of the generated JVM bytecode (1.8, 9, 10, ..., 20), default is 1.8
|
||||
* Possible values: "1.8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"
|
||||
* Default value: "1.8"
|
||||
* Default value: JvmTarget.DEFAULT
|
||||
*/
|
||||
var jvmTarget: kotlin.String
|
||||
get() = options.jvmTarget.get().jvmTargetKotlinOption
|
||||
|
||||
Reference in New Issue
Block a user