[Gradle] Document KotlinToolTask

^KT-58858 In Progress
This commit is contained in:
Yahor Berdnikau
2023-07-18 22:30:04 +02:00
committed by Space Team
parent 2e8d2800f5
commit f988de60c3
@@ -10,14 +10,34 @@ import org.gradle.api.Task
import org.gradle.api.tasks.Nested
import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerToolOptions
/**
* Represents a Kotlin task performing further processing of compiled code via additional Kotlin tools using configurable [toolOptions].
*
* Check [KotlinCommonCompilerToolOptions] inheritors (excluding [KotlinCommonCompilerToolOptions]) for possible available for configuration
* tool options.
*
* @see [KotlinCommonCompilerToolOptions]
*/
interface KotlinToolTask<out TO : KotlinCommonCompilerToolOptions> : Task {
/**
* Represents the tool options used by a Kotlin task with reasonable configured defaults.
*
* Could be used to either get the values of currently configured options or to modify them.
*/
@get:Nested
val toolOptions: TO
/**
* Configures the [toolOptions] with the provided configuration.
*/
fun toolOptions(configure: TO.() -> Unit) {
configure(toolOptions)
}
/**
* Configures the [toolOptions] with the provided configuration.
*/
fun toolOptions(configure: Action<in TO>) {
configure.execute(toolOptions)
}