[Gradle] Deprecate dceOptions in KotlinJsDce task
^KT-63419 In Progress
This commit is contained in:
committed by
Space Team
parent
24acf800d6
commit
4921a29aa5
@@ -267,7 +267,6 @@ public final class org/jetbrains/kotlin/gradle/dsl/KotlinCompile$DefaultImpls {
|
||||
}
|
||||
|
||||
public final class org/jetbrains/kotlin/gradle/dsl/KotlinCompileKt {
|
||||
public static final field KOTLIN_OPTIONS_AS_TOOLS_DEPRECATION_MESSAGE Ljava/lang/String;
|
||||
}
|
||||
|
||||
public abstract interface annotation class org/jetbrains/kotlin/gradle/dsl/KotlinGradlePluginDsl : java/lang/annotation/Annotation {
|
||||
|
||||
+1
-1
@@ -71,4 +71,4 @@ const val KOTLIN_OPTIONS_DEPRECATION_MESSAGE = "Please migrate to the compilerOp
|
||||
* @suppress
|
||||
*/
|
||||
@InternalKotlinGradlePluginApi
|
||||
const val KOTLIN_OPTIONS_AS_TOOLS_DEPRECATION_MESSAGE = "Please migrate to toolOptions DSL. More details are here: https://kotl.in/u1r8ln"
|
||||
const val KOTLIN_OPTIONS_AS_TOOLS_DEPRECATION_MESSAGE = "Please migrate to the toolOptions DSL. More details are here: https://kotl.in/u1r8ln"
|
||||
|
||||
+9
-9
@@ -16,11 +16,11 @@
|
||||
|
||||
package org.jetbrains.kotlin.gradle.dsl
|
||||
|
||||
import groovy.lang.Closure
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.Internal
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinToolTask
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile as KotlinJvmCompileApi
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@@ -41,21 +41,21 @@ internal interface KotlinNativeCompileTask : KotlinCompile<KotlinCommonOptions>,
|
||||
interface KotlinCommonCompile : KotlinCompile<KotlinMultiplatformCommonOptions>,
|
||||
KotlinCompilationTask<KotlinMultiplatformCommonCompilerOptions>
|
||||
|
||||
interface KotlinJsDce : Task {
|
||||
interface KotlinJsDce : Task, KotlinToolTask<KotlinJsDceCompilerToolOptions> {
|
||||
|
||||
@Deprecated(KOTLIN_OPTIONS_AS_TOOLS_DEPRECATION_MESSAGE)
|
||||
@get:Internal
|
||||
val dceOptions: KotlinJsDceOptions
|
||||
|
||||
@get:Input
|
||||
val keep: MutableList<String>
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@Deprecated(KOTLIN_OPTIONS_AS_TOOLS_DEPRECATION_MESSAGE)
|
||||
fun dceOptions(fn: KotlinJsDceOptions.() -> Unit) {
|
||||
dceOptions.fn()
|
||||
}
|
||||
|
||||
fun dceOptions(fn: Closure<*>) {
|
||||
fn.delegate = dceOptions
|
||||
fn.call()
|
||||
}
|
||||
@get:Input
|
||||
val keep: MutableList<String>
|
||||
|
||||
|
||||
fun keep(vararg fqn: String)
|
||||
}
|
||||
+1
-1
@@ -43,7 +43,6 @@ import javax.inject.Inject
|
||||
abstract class KotlinJsDce @Inject constructor(
|
||||
objectFactory: ObjectFactory
|
||||
) : AbstractKotlinCompileTool<K2JSDceArguments>(objectFactory),
|
||||
KotlinToolTask<KotlinJsDceCompilerToolOptions>,
|
||||
KotlinJsDce {
|
||||
|
||||
init {
|
||||
@@ -68,6 +67,7 @@ abstract class KotlinJsDce @Inject constructor(
|
||||
@Internal
|
||||
var kotlinFilesOnly: Boolean = false
|
||||
|
||||
@Deprecated(KOTLIN_OPTIONS_AS_TOOLS_DEPRECATION_MESSAGE)
|
||||
@get:Internal
|
||||
override val dceOptions: KotlinJsDceOptions = object : KotlinJsDceOptions {
|
||||
override val options: KotlinJsDceCompilerToolOptions
|
||||
|
||||
Reference in New Issue
Block a user