[Gradle] Deprecate Kotlin*Options types

^KT-63419 In Progress
This commit is contained in:
Yahor Berdnikau
2024-02-23 19:57:34 +01:00
committed by Space Team
parent 4921a29aa5
commit 6e874340e9
46 changed files with 112 additions and 64 deletions
@@ -29,6 +29,7 @@ interface KotlinNativeArtifact : KotlinArtifact {
val modes: Set<NativeBuildType>
val isStatic: Boolean
val linkerOptions: List<String>
@Suppress("DEPRECATION")
val kotlinOptionsFn: KotlinCommonToolOptions.() -> Unit
val toolOptionsConfigure: KotlinCommonCompilerToolOptions.() -> Unit
val binaryOptions: Map<String, String>
@@ -84,7 +85,7 @@ interface KotlinNativeArtifactConfig : KotlinArtifactConfig {
fun modes(vararg modes: NativeBuildType)
var isStatic: Boolean
var linkerOptions: List<String>
fun kotlinOptions(fn: Action<KotlinCommonToolOptions>)
fun kotlinOptions(@Suppress("DEPRECATION") fn: Action<KotlinCommonToolOptions>)
fun toolOptions(configure: Action<KotlinCommonCompilerToolOptions>)
fun binaryOption(name: String, value: String)
}
@@ -8,6 +8,9 @@ package org.jetbrains.kotlin.gradle.dsl
/**
* Common compiler options for all Kotlin platforms.
*/
@Deprecated(
"The kotlinOptions types are deprecated, please migrate to the compilerOptions types. More details are here: https://kotl.in/u1r8ln"
)
interface KotlinCommonOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonToolOptions {
/**
* @suppress
@@ -8,6 +8,9 @@ package org.jetbrains.kotlin.gradle.dsl
/**
* Common options for all Kotlin platforms' compilations and tools.
*/
@Deprecated(
"The kotlinOptions types are deprecated, please migrate to the compilerOptions types. More details are here: https://kotl.in/u1r8ln"
)
interface KotlinCommonToolOptions {
/**
* @suppress
@@ -22,11 +22,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
*
* @see [KotlinCommonOptions]
*/
@Suppress("TYPEALIAS_EXPANSION_DEPRECATION")
@Deprecated(
message = "Replaced with 'KotlinCompilationTask' that exposes the compiler options DSL. More details are here: https://kotl.in/u1r8ln"
)
@KotlinGradlePluginDsl
interface KotlinCompile<out T : KotlinCommonOptions> : Task {
interface KotlinCompile<out T : KotlinCommonOptionsDeprecated> : Task {
/**
* Represents the compiler options used by a Kotlin compilation process.
@@ -8,6 +8,9 @@ package org.jetbrains.kotlin.gradle.dsl
/**
* Options for the Kotlin JavaScript dead code elimination tool.
*/
@Deprecated(
"The kotlinOptions types are deprecated, please migrate to the compilerOptions types. More details are here: https://kotl.in/u1r8ln"
)
interface KotlinJsDceOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonToolOptions {
/**
* @suppress
@@ -8,6 +8,9 @@ package org.jetbrains.kotlin.gradle.dsl
/**
* Compiler options for Kotlin/JS.
*/
@Deprecated(
"The kotlinOptions types are deprecated, please migrate to the compilerOptions types. More details are here: https://kotl.in/u1r8ln"
)
interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions {
/**
* @suppress
@@ -8,6 +8,9 @@ package org.jetbrains.kotlin.gradle.dsl
/**
* Compiler options for Kotlin/JVM.
*/
@Deprecated(
"The kotlinOptions types are deprecated, please migrate to the compilerOptions types. More details are here: https://kotl.in/u1r8ln"
)
interface KotlinJvmOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions {
/**
* @suppress
@@ -8,6 +8,9 @@ package org.jetbrains.kotlin.gradle.dsl
/**
* Compiler options for the Kotlin common platform.
*/
@Deprecated(
"The kotlinOptions types are deprecated, please migrate to the compilerOptions types. More details are here: https://kotl.in/u1r8ln"
)
interface KotlinMultiplatformCommonOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions {
/**
* @suppress
@@ -3,6 +3,8 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@file:Suppress("TYPEALIAS_EXPANSION_DEPRECATION")
package org.jetbrains.kotlin.gradle.plugin
import org.gradle.api.Action
@@ -138,6 +138,7 @@ interface BaseKotlinCompile : KotlinCompileTool {
/**
* Represents a Kotlin task compiling given Kotlin sources into JVM class files.
*/
@Suppress("TYPEALIAS_EXPANSION_DEPRECATION")
interface KotlinJvmCompile : BaseKotlinCompile,
KotlinCompileDeprecated<KotlinJvmOptionsDeprecated>,
KotlinCompilationTask<KotlinJvmCompilerOptions>,