[Gradle] Deprecate HasCompilerOptions
This DSL is not consistent with other DSL to configuring compiler options. ^KT-65568 In Progress
This commit is contained in:
committed by
Space Team
parent
42cba927e6
commit
5df05d5797
+15
@@ -8,13 +8,28 @@ package org.jetbrains.kotlin.gradle.plugin
|
||||
import org.gradle.api.Action
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions
|
||||
|
||||
/**
|
||||
* @suppress
|
||||
*/
|
||||
@Deprecated(
|
||||
message = "Not consistent with other DSL to configure compiler options."
|
||||
)
|
||||
interface HasCompilerOptions<out CO : KotlinCommonCompilerOptions> {
|
||||
/**
|
||||
* @suppress
|
||||
*/
|
||||
val options: CO
|
||||
|
||||
/**
|
||||
* @suppress
|
||||
*/
|
||||
fun configure(configuration: CO.() -> Unit) {
|
||||
configuration(options)
|
||||
}
|
||||
|
||||
/**
|
||||
* @suppress
|
||||
*/
|
||||
fun configure(configuration: Action<@UnsafeVariance CO>) {
|
||||
configuration.execute(options)
|
||||
}
|
||||
|
||||
+1
@@ -59,6 +59,7 @@ interface KotlinCompilation<out T : KotlinCommonOptionsDeprecated> : Named,
|
||||
|
||||
val compileKotlinTaskName: String
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
val compilerOptions: HasCompilerOptions<*>
|
||||
|
||||
@Deprecated(
|
||||
|
||||
Reference in New Issue
Block a user