From 365c04a7f75cf28524d6b45e08b59f4022245b31 Mon Sep 17 00:00:00 2001 From: Yahor Berdnikau Date: Tue, 18 Jul 2023 22:48:51 +0200 Subject: [PATCH] [Gradle] Update documentation for CompileUsingKotlinDaemon ^KT-58858 In Progress --- .../gradle/tasks/CompileUsingKotlinDaemon.kt | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/CompileUsingKotlinDaemon.kt b/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/CompileUsingKotlinDaemon.kt index 6e456f1f366..6582709a2fe 100644 --- a/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/CompileUsingKotlinDaemon.kt +++ b/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/CompileUsingKotlinDaemon.kt @@ -10,10 +10,12 @@ import org.gradle.api.provider.ListProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.Internal +/** + * The available Kotlin compilation execution strategies in Gradle. + * + * @property propertyValue value that should be passed for `kotlin.compiler.execution.strategy` Gradle property to choose the strategy + */ enum class KotlinCompilerExecutionStrategy( - /** - * Value that should be passed for `kotlin.compiler.execution.strategy` Gradle property to choose the strategy - */ val propertyValue: String ) { /** @@ -38,7 +40,13 @@ enum class KotlinCompilerExecutionStrategy( OUT_OF_PROCESS("out-of-process"), ; + /** + * @suppress + */ companion object { + /** + * @suppress + */ fun fromProperty(value: String?) = if (value == null) { DAEMON @@ -50,25 +58,28 @@ enum class KotlinCompilerExecutionStrategy( } /** - * Task is using Kotlin daemon to run compilation. + * Represents a Kotlin task that uses the Kotlin daemon to compile. */ interface CompileUsingKotlinDaemon : Task { /** - * Provides JVM arguments to Kotlin daemon, default is `null` if "kotlin.daemon.jvmargs" property is not set. + * Provides JVM arguments to the Kotlin daemon. The default is `null` if the `kotlin.daemon.jvmargs` property is not set. */ @get:Internal val kotlinDaemonJvmArguments: ListProperty /** - * Defines compiler execution strategy, see docs for [KotlinCompilerExecutionStrategy] for more details + * Defines the compiler execution strategy, see docs for [KotlinCompilerExecutionStrategy] for more details. + * + * @see [KotlinCompilerExecutionStrategy] */ @get:Internal val compilerExecutionStrategy: Property /** * Defines whether task execution should fail when [compilerExecutionStrategy] is set to [KotlinCompilerExecutionStrategy.DAEMON] - * and compilation via Kotlin daemon was not possible. If set to true then compilation in such case will be retried without the daemon. - * Default is `true` + * and compilation via the Kotlin daemon is not possible. If set to true, then compilation is retried without the daemon. + * + * Default: `true` */ @get:Internal val useDaemonFallbackStrategy: Property