[Gradle] Document KotlinCompilationTask
Remove KotlinCompilationTask from KotlinCompile class as it anyway comes via KotlinJvmCompile interface. ^KT-58858 In Progress
This commit is contained in:
committed by
Space Team
parent
73bfc88613
commit
2e8d2800f5
+19
@@ -10,14 +10,33 @@ import org.gradle.api.Task
|
||||
import org.gradle.api.tasks.Nested
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions
|
||||
|
||||
/**
|
||||
* Represents a Kotlin task compiling using configurable [compilerOptions].
|
||||
*
|
||||
* See [KotlinCommonCompilerOptions] and its inheritors for possible compiler options.
|
||||
*
|
||||
* @see [KotlinCommonCompilerOptions]
|
||||
*/
|
||||
interface KotlinCompilationTask<out CO : KotlinCommonCompilerOptions> : Task {
|
||||
|
||||
/**
|
||||
* Represents the compiler options used by a Kotlin compilation process.
|
||||
*
|
||||
* This can be used to get the values of currently configured options or modify them.
|
||||
*/
|
||||
@get:Nested
|
||||
val compilerOptions: CO
|
||||
|
||||
/**
|
||||
* Configures the [compilerOptions] with the provided configuration.
|
||||
*/
|
||||
fun compilerOptions(configure: CO.() -> Unit) {
|
||||
configure(compilerOptions)
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the [compilerOptions] with the provided configuration.
|
||||
*/
|
||||
fun compilerOptions(configure: Action<in CO>) {
|
||||
configure.execute(compilerOptions)
|
||||
}
|
||||
|
||||
+1
-2
@@ -61,8 +61,7 @@ abstract class KotlinCompile @Inject constructor(
|
||||
objectFactory: ObjectFactory
|
||||
) : AbstractKotlinCompile<K2JVMCompilerArguments>(objectFactory, workerExecutor),
|
||||
K2MultiplatformCompilationTask,
|
||||
@Suppress("TYPEALIAS_EXPANSION_DEPRECATION") KotlinJvmCompileDsl,
|
||||
KotlinCompilationTask<KotlinJvmCompilerOptions> {
|
||||
@Suppress("TYPEALIAS_EXPANSION_DEPRECATION") KotlinJvmCompileDsl {
|
||||
|
||||
final override val kotlinOptions: KotlinJvmOptions = KotlinJvmOptionsCompat(
|
||||
{ this },
|
||||
|
||||
Reference in New Issue
Block a user