[Gradle] Slight improvement for generated compiler options KDoc
Separated possible and default value from the description. ^KT-58858 In Progress
This commit is contained in:
committed by
Space Team
parent
aeaaf6dd8e
commit
c26b5ca365
@@ -912,8 +912,10 @@ private fun Printer.generateDoc(property: KProperty1<*, *>) {
|
||||
println("/**")
|
||||
println(" * ${description.replace("\n", " ")}")
|
||||
if (possibleValues != null) {
|
||||
println(" *")
|
||||
println(" * Possible values: ${possibleValues.joinToString()}")
|
||||
}
|
||||
println(" *")
|
||||
println(" * Default value: ${defaultValue.removePrefix("$OPTIONS_PACKAGE_PREFIX.")}")
|
||||
println(" */")
|
||||
}
|
||||
|
||||
+7
@@ -12,7 +12,9 @@ interface KotlinCommonCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCo
|
||||
|
||||
/**
|
||||
* Allow using declarations from only the specified version of bundled libraries.
|
||||
*
|
||||
* Possible values: "1.4 (deprecated)", "1.5 (deprecated)", "1.6 (deprecated)", "1.7", "1.8", "1.9", "2.0", "2.1 (experimental)"
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Optional
|
||||
@@ -21,7 +23,9 @@ interface KotlinCommonCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCo
|
||||
|
||||
/**
|
||||
* Provide source compatibility with the specified version of Kotlin.
|
||||
*
|
||||
* Possible values: "1.4 (deprecated)", "1.5 (deprecated)", "1.6 (deprecated)", "1.7", "1.8", "1.9", "2.0", "2.1 (experimental)"
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Optional
|
||||
@@ -30,6 +34,7 @@ interface KotlinCommonCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCo
|
||||
|
||||
/**
|
||||
* Enable API usages that require opt-in with an opt-in requirement marker with the given fully qualified name.
|
||||
*
|
||||
* Default value: emptyList<String>()
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -37,6 +42,7 @@ interface KotlinCommonCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCo
|
||||
|
||||
/**
|
||||
* Enable progressive compiler mode. In this mode, deprecations and bug fixes for unstable code take effect immediately instead of going through a graceful migration cycle. Code written in progressive mode is backward compatible; however, code written without progressive mode enabled may cause compilation errors in progressive mode.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -44,6 +50,7 @@ interface KotlinCommonCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCo
|
||||
|
||||
/**
|
||||
* Compile using the experimental K2 compiler pipeline. No compatibility guarantees are provided yet.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
@Deprecated(message = "Compiler flag -Xuse-k2 is deprecated; please use language version 2.0 instead", level = DeprecationLevel.WARNING)
|
||||
|
||||
+4
@@ -12,6 +12,7 @@ interface KotlinCommonCompilerToolOptions {
|
||||
|
||||
/**
|
||||
* Report an error if there are any warnings.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -19,6 +20,7 @@ interface KotlinCommonCompilerToolOptions {
|
||||
|
||||
/**
|
||||
* Don't generate any warnings.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Internal
|
||||
@@ -26,6 +28,7 @@ interface KotlinCommonCompilerToolOptions {
|
||||
|
||||
/**
|
||||
* Enable verbose logging output.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Internal
|
||||
@@ -33,6 +36,7 @@ interface KotlinCommonCompilerToolOptions {
|
||||
|
||||
/**
|
||||
* A list of additional compiler arguments
|
||||
*
|
||||
* Default value: emptyList<String>()
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
|
||||
+5
@@ -20,7 +20,9 @@ interface KotlinCommonOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonTool
|
||||
|
||||
/**
|
||||
* Allow using declarations from only the specified version of bundled libraries.
|
||||
*
|
||||
* Possible values: "1.4 (deprecated)", "1.5 (deprecated)", "1.6 (deprecated)", "1.7", "1.8", "1.9", "2.0", "2.1 (experimental)"
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
var apiVersion: kotlin.String?
|
||||
@@ -33,7 +35,9 @@ interface KotlinCommonOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonTool
|
||||
|
||||
/**
|
||||
* Provide source compatibility with the specified version of Kotlin.
|
||||
*
|
||||
* Possible values: "1.4 (deprecated)", "1.5 (deprecated)", "1.6 (deprecated)", "1.7", "1.8", "1.9", "2.0", "2.1 (experimental)"
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
var languageVersion: kotlin.String?
|
||||
@@ -42,6 +46,7 @@ interface KotlinCommonOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonTool
|
||||
|
||||
/**
|
||||
* Compile using the experimental K2 compiler pipeline. No compatibility guarantees are provided yet.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
@Deprecated(message = "Compiler flag -Xuse-k2 is deprecated; please use language version 2.0 instead", level = DeprecationLevel.WARNING)
|
||||
|
||||
+4
@@ -16,6 +16,7 @@ interface KotlinCommonToolOptions {
|
||||
|
||||
/**
|
||||
* Report an error if there are any warnings.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
var allWarningsAsErrors: kotlin.Boolean
|
||||
@@ -24,6 +25,7 @@ interface KotlinCommonToolOptions {
|
||||
|
||||
/**
|
||||
* Don't generate any warnings.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
var suppressWarnings: kotlin.Boolean
|
||||
@@ -32,6 +34,7 @@ interface KotlinCommonToolOptions {
|
||||
|
||||
/**
|
||||
* Enable verbose logging output.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
var verbose: kotlin.Boolean
|
||||
@@ -40,6 +43,7 @@ interface KotlinCommonToolOptions {
|
||||
|
||||
/**
|
||||
* A list of additional compiler arguments
|
||||
*
|
||||
* Default value: emptyList<String>()
|
||||
*/
|
||||
var freeCompilerArgs: kotlin.collections.List<kotlin.String>
|
||||
|
||||
+19
@@ -12,6 +12,7 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Disable internal declaration export.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -19,7 +20,9 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Specify whether the 'main' function should be called upon execution.
|
||||
*
|
||||
* Possible values: "call", "noCall"
|
||||
*
|
||||
* Default value: JsMainFunctionExecutionMode.CALL
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -27,6 +30,7 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Generate .meta.js and .kjsm files with metadata. Use this to create a library.
|
||||
*
|
||||
* Default value: true
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -34,7 +38,9 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* The kind of JS module generated by the compiler.
|
||||
*
|
||||
* Possible values: "plain", "amd", "commonjs", "umd"
|
||||
*
|
||||
* Default value: JsModuleKind.MODULE_PLAIN
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -42,6 +48,7 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Base name of generated files.
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Optional
|
||||
@@ -50,6 +57,7 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Don't automatically include the default Kotlin/JS stdlib in compilation dependencies.
|
||||
*
|
||||
* Default value: true
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -57,6 +65,7 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Destination *.js file for the compilation result.
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
@Deprecated(message = "Only for legacy backend. For IR backend please use task.destinationDirectory and moduleName", level = DeprecationLevel.WARNING)
|
||||
@@ -65,6 +74,7 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Generate a source map.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -72,7 +82,9 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Embed source files into the source map.
|
||||
*
|
||||
* Possible values: "never", "always", "inlining"
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Optional
|
||||
@@ -81,7 +93,9 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Mode for mapping generated names to original names (IR backend only).
|
||||
*
|
||||
* Possible values: "no", "simple-names", "fully-qualified-names"
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Optional
|
||||
@@ -90,6 +104,7 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Add the specified prefix to the paths in the source map.
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Optional
|
||||
@@ -98,7 +113,9 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Generate JS files for the specified ECMA version.
|
||||
*
|
||||
* Possible values: "v5"
|
||||
*
|
||||
* Default value: "v5"
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -106,6 +123,7 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Translate primitive arrays into JS typed arrays.
|
||||
*
|
||||
* Default value: true
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -113,6 +131,7 @@ interface KotlinJsCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommon
|
||||
|
||||
/**
|
||||
* Let generated JavaScript code use ES2015 classes.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
|
||||
+2
@@ -12,6 +12,7 @@ interface KotlinJsDceCompilerToolOptions : org.jetbrains.kotlin.gradle.dsl.Kotli
|
||||
|
||||
/**
|
||||
* Development mode: don't strip out any code, just copy dependencies.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -19,6 +20,7 @@ interface KotlinJsDceCompilerToolOptions : org.jetbrains.kotlin.gradle.dsl.Kotli
|
||||
|
||||
/**
|
||||
* Output directory.
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
@Deprecated(message = "Use task 'destinationDirectory' to configure output directory", level = DeprecationLevel.WARNING)
|
||||
|
||||
+2
@@ -16,6 +16,7 @@ interface KotlinJsDceOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonToolO
|
||||
|
||||
/**
|
||||
* Development mode: don't strip out any code, just copy dependencies.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
var devMode: kotlin.Boolean
|
||||
@@ -24,6 +25,7 @@ interface KotlinJsDceOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonToolO
|
||||
|
||||
/**
|
||||
* Output directory.
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
@Deprecated(message = "Use task 'destinationDirectory' to configure output directory", level = DeprecationLevel.WARNING)
|
||||
|
||||
+19
@@ -16,6 +16,7 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Disable internal declaration export.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
var friendModulesDisabled: kotlin.Boolean
|
||||
@@ -28,7 +29,9 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Specify whether the 'main' function should be called upon execution.
|
||||
*
|
||||
* Possible values: "call", "noCall"
|
||||
*
|
||||
* Default value: JsMainFunctionExecutionMode.CALL
|
||||
*/
|
||||
var main: kotlin.String
|
||||
@@ -37,6 +40,7 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Generate .meta.js and .kjsm files with metadata. Use this to create a library.
|
||||
*
|
||||
* Default value: true
|
||||
*/
|
||||
var metaInfo: kotlin.Boolean
|
||||
@@ -49,7 +53,9 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* The kind of JS module generated by the compiler.
|
||||
*
|
||||
* Possible values: "plain", "amd", "commonjs", "umd"
|
||||
*
|
||||
* Default value: JsModuleKind.MODULE_PLAIN
|
||||
*/
|
||||
var moduleKind: kotlin.String
|
||||
@@ -58,6 +64,7 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Base name of generated files.
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
var moduleName: kotlin.String?
|
||||
@@ -66,6 +73,7 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Don't automatically include the default Kotlin/JS stdlib in compilation dependencies.
|
||||
*
|
||||
* Default value: true
|
||||
*/
|
||||
var noStdlib: kotlin.Boolean
|
||||
@@ -74,6 +82,7 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Destination *.js file for the compilation result.
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
@Deprecated(message = "Only for legacy backend. For IR backend please use task.destinationDirectory and moduleName", level = DeprecationLevel.WARNING)
|
||||
@@ -83,6 +92,7 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Generate a source map.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
var sourceMap: kotlin.Boolean
|
||||
@@ -95,7 +105,9 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Embed source files into the source map.
|
||||
*
|
||||
* Possible values: "never", "always", "inlining"
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
var sourceMapEmbedSources: kotlin.String?
|
||||
@@ -108,7 +120,9 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Mode for mapping generated names to original names (IR backend only).
|
||||
*
|
||||
* Possible values: "no", "simple-names", "fully-qualified-names"
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
var sourceMapNamesPolicy: kotlin.String?
|
||||
@@ -117,6 +131,7 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Add the specified prefix to the paths in the source map.
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
var sourceMapPrefix: kotlin.String?
|
||||
@@ -125,7 +140,9 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Generate JS files for the specified ECMA version.
|
||||
*
|
||||
* Possible values: "v5"
|
||||
*
|
||||
* Default value: "v5"
|
||||
*/
|
||||
var target: kotlin.String
|
||||
@@ -134,6 +151,7 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Translate primitive arrays into JS typed arrays.
|
||||
*
|
||||
* Default value: true
|
||||
*/
|
||||
var typedArrays: kotlin.Boolean
|
||||
@@ -142,6 +160,7 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Let generated JavaScript code use ES2015 classes.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
var useEsClasses: kotlin.Boolean
|
||||
|
||||
+5
@@ -12,6 +12,7 @@ interface KotlinJvmCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommo
|
||||
|
||||
/**
|
||||
* Generate metadata for Java 1.8 reflection on method parameters.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -19,7 +20,9 @@ interface KotlinJvmCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommo
|
||||
|
||||
/**
|
||||
* The target version of the generated JVM bytecode (1.8, 9, 10, ..., 21), with 1.8 as the default.
|
||||
*
|
||||
* Possible values: "1.8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21"
|
||||
*
|
||||
* Default value: JvmTarget.DEFAULT
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
@@ -27,6 +30,7 @@ interface KotlinJvmCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommo
|
||||
|
||||
/**
|
||||
* Name of the generated '.kotlin_module' file.
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Optional
|
||||
@@ -35,6 +39,7 @@ interface KotlinJvmCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommo
|
||||
|
||||
/**
|
||||
* Don't automatically include the Java runtime in the classpath.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Input
|
||||
|
||||
+5
@@ -16,6 +16,7 @@ interface KotlinJvmOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Generate metadata for Java 1.8 reflection on method parameters.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
var javaParameters: kotlin.Boolean
|
||||
@@ -28,7 +29,9 @@ interface KotlinJvmOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* The target version of the generated JVM bytecode (1.8, 9, 10, ..., 21), with 1.8 as the default.
|
||||
*
|
||||
* Possible values: "1.8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21"
|
||||
*
|
||||
* Default value: JvmTarget.DEFAULT
|
||||
*/
|
||||
var jvmTarget: kotlin.String
|
||||
@@ -37,6 +40,7 @@ interface KotlinJvmOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Name of the generated '.kotlin_module' file.
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
var moduleName: kotlin.String?
|
||||
@@ -45,6 +49,7 @@ interface KotlinJvmOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
|
||||
/**
|
||||
* Don't automatically include the Java runtime in the classpath.
|
||||
*
|
||||
* Default value: false
|
||||
*/
|
||||
var noJdk: kotlin.Boolean
|
||||
|
||||
+1
@@ -12,6 +12,7 @@ interface KotlinNativeCompilerOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCo
|
||||
|
||||
/**
|
||||
* Specify a name for the compilation module.
|
||||
*
|
||||
* Default value: null
|
||||
*/
|
||||
@get:org.gradle.api.tasks.Optional
|
||||
|
||||
Reference in New Issue
Block a user