[Gradle] Raise various forgotten deprecation warnings levels for 2.2 part 2/2
Relates to KT-68597
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kotlin2JsGradlePluginIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kotlin2JsGradlePluginIT.kt
index 21fe97c..fbe94ff 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kotlin2JsGradlePluginIT.kt
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kotlin2JsGradlePluginIT.kt
@@ -956,7 +956,7 @@
buildGradleKts.appendText(
"""
|
- |yarn.version = "1.9.3"
+ |the<YarnRootEnvSpec>().version.set("1.9.3")
""".trimMargin()
)
@@ -980,10 +980,11 @@
buildGradleKts.appendText(
"""
|
- |project.rootProject.extensions.findByType<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>()?.apply {
- | downloadBaseUrl = projectDir.toURI().toString()
- | version = "1.22.22"
+ |rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin> {
+ | the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootEnvSpec>().version.set("1.22.22")
+ | the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootEnvSpec>().downloadBaseUrl.set(projectDir.toURI().toString())
|}
+ |
""".trimMargin()
)
@@ -1461,12 +1462,12 @@
it + "\n" +
"""
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
- rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "unspecified"
- rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().download = false
+ the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec>().version.set("unspecified")
+ the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec>().download.set(false)
}
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin> {
- rootProject.the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>().version = "unspecified"
- rootProject.the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>().download = false
+ the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootEnvSpec>().version.set("unspecified")
+ the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootEnvSpec>().download.set(false)
}
"""
}
@@ -1623,11 +1624,11 @@
it + """
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
- rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().download = false
+ the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec>().download.set(false)
}
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin> {
- rootProject.the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>().download = false
+ the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootEnvSpec>().download.set(false)
}
""".trimIndent()
}
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/KotlinWasmGradlePluginIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/KotlinWasmGradlePluginIT.kt
index 02f41ce..f0b8cc1 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/KotlinWasmGradlePluginIT.kt
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/KotlinWasmGradlePluginIT.kt
@@ -125,7 +125,7 @@
fun wasiTargetWithBinaryen(gradleVersion: GradleVersion) {
project("new-mpp-wasm-wasi-test", gradleVersion) {
buildGradleKts.modify {
- it.replace("wasmWasi {", "wasmWasi {\napplyBinaryen()\nbinaries.executable()")
+ it.replace("wasmWasi {", "wasmWasi {\nbinaries.executable()")
}
build("assemble") {
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/NodeJsGradlePluginIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/NodeJsGradlePluginIT.kt
index e1c62a8..65f72b6 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/NodeJsGradlePluginIT.kt
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/NodeJsGradlePluginIT.kt
@@ -75,7 +75,7 @@
) {
listOf("app1", "app2").forEach { subProjectName ->
subProject(subProjectName).buildGradleKts.modify {
- it.replace("plugins.", "rootProject.plugins.")
+ it.replace("plugins.", "@Suppress(\"DEPRECATION_ERROR\") rootProject.plugins.")
.replace("the", "rootProject.the")
.replace("NodeJsPlugin", "NodeJsRootPlugin")
.replace("NodeJsEnvSpec", "NodeJsRootExtension")
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/js-project-repos/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/js-project-repos/build.gradle.kts
index 5c3d449..d8628e5 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/js-project-repos/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/js-project-repos/build.gradle.kts
@@ -15,9 +15,9 @@
yarn
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
- rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().downloadBaseUrl = null
+ the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec>().downloadBaseUrl.set(null as String?)
}
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin> {
- rootProject.the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>().downloadBaseUrl = null
+ the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootEnvSpec>().downloadBaseUrl.set(null as String?)
}
\ No newline at end of file
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kotlin-js-package-module-name/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kotlin-js-package-module-name/build.gradle.kts
index 2b25108..c3ea81c 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kotlin-js-package-module-name/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kotlin-js-package-module-name/build.gradle.kts
@@ -9,7 +9,7 @@
kotlin {
js {
- moduleName = "@foo/bar"
+ outputModuleName.set("@foo/bar")
browser {
}
binaries.executable()
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/native-binaries/groovy-dsl/build.gradle b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/native-binaries/groovy-dsl/build.gradle
index 9d33471..a102a43 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/native-binaries/groovy-dsl/build.gradle
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/native-binaries/groovy-dsl/build.gradle
@@ -61,8 +61,10 @@
executable("test2", [RELEASE]) {
compilation = compilations["test"]
freeCompilerArgs += "-tr"
- linkTask.kotlinOptions {
- freeCompilerArgs += "-Xtime"
+ linkTaskProvider.configure {
+ toolOptions {
+ freeCompilerArgs.add("-Xtime")
+ }
}
}
@@ -75,7 +77,7 @@
}
// Check that we can access binaries/tasks:
// Just by name:
- println("Check link task: ${binaries.releaseShared.linkTask.name}")
+ println("Check link task: ${binaries.releaseShared.linkTaskProvider.name}")
// Using a typed getter:
println("Check run task: ${binaries.getExecutable("foo", RELEASE).runTask.name}")
}
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/native-binaries/kotlin-dsl/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/native-binaries/kotlin-dsl/build.gradle.kts
index 6bc6fc2..3d62a53 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/native-binaries/kotlin-dsl/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/native-binaries/kotlin-dsl/build.gradle.kts
@@ -50,8 +50,10 @@
executable("test2") {
compilation = compilations["test"]
freeCompilerArgs += "-tr"
- linkTask.kotlinOptions {
- freeCompilerArgs += "-Xtime"
+ linkTaskProvider.configure {
+ toolOptions {
+ freeCompilerArgs.add("-Xtime")
+ }
}
}
@@ -64,7 +66,7 @@
}
// Check that we can access binaries/tasks:
// Just by name:
- println("Check link task: ${binaries["releaseShared"].linkTask.name}")
+ println("Check link task: ${binaries["releaseShared"].linkTaskProvider.name}")
// Using a typed getter:
println("Check run task: ${binaries.getExecutable("foo", RELEASE).runTask?.name}")
}
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-js/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-js/build.gradle.kts
index 0dbff83..9429ba1 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-js/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-js/build.gradle.kts
@@ -9,13 +9,13 @@
kotlin {
wasmJs {
- moduleName = "redefined-wasm-module-name"
+ outputModuleName.set("redefined-wasm-module-name")
<JsEngine> {
}
binaries.executable()
}
js {
- moduleName = "redefined-js-module-name"
+ outputModuleName.set("redefined-js-module-name")
browser {
}
binaries.executable()
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-test/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-test/build.gradle.kts
index 0e6a2d3..8fc8e9f3 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-test/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-test/build.gradle.kts
@@ -28,10 +28,10 @@
}
rootProject.plugins.apply(org.jetbrains.kotlin.gradle.targets.js.d8.D8Plugin::class.java)
-rootProject.the<org.jetbrains.kotlin.gradle.targets.js.d8.D8RootExtension>().apply {
+the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec>().apply {
// Test that we can set the version and it is a String.
// But use the default version since update this place every time anyway.
- version = (version as String)
+ version.set(version.get())
}
tasks.named<org.jetbrains.kotlin.gradle.targets.js.npm.LockCopyTask>("kotlinStorePackageLock") {
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-js-test/app/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-js-test/app/build.gradle.kts
index 64f3c41..2239a43 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-js-test/app/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-js-test/app/build.gradle.kts
@@ -27,4 +27,6 @@
}
}
}
-}
\ No newline at end of file
+}
+
+the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec>().version.set("20.2.0")
\ No newline at end of file
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-js-test/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-js-test/build.gradle.kts
index c098664..314f57f 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-js-test/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-js-test/build.gradle.kts
@@ -3,20 +3,12 @@
}
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
- rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "20.2.0"
-
tasks.named<org.jetbrains.kotlin.gradle.targets.js.npm.LockCopyTask>("kotlinStorePackageLock") {
//A little hacky way to make yarn results
inputFile.fileValue(projectDir.resolve("packageLockStub"))
}
}
-rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.d8.D8Plugin> {
- // Test that we can set the version and it is a String.
- // But use the default version since update this place every time anyway.
- rootProject.the<org.jetbrains.kotlin.gradle.targets.js.d8.D8RootExtension>().version = (version as String)
-}
-
allprojects {
repositories {
mavenLocal()
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-js-test/lib/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-js-test/lib/build.gradle.kts
index 6f4e8f1..15c3d24 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-js-test/lib/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-js-test/lib/build.gradle.kts
@@ -12,3 +12,5 @@
nodejs {}
}
}
+
+the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec>().version.set("20.2.0")
\ No newline at end of file
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-test/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-test/build.gradle.kts
index 44fdafa..0150444 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-test/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-wasm-wasi-test/build.gradle.kts
@@ -24,11 +24,6 @@
}
rootProject.plugins.apply(org.jetbrains.kotlin.gradle.targets.js.d8.D8Plugin::class.java)
-rootProject.the<org.jetbrains.kotlin.gradle.targets.js.d8.D8RootExtension>().apply {
- // Test that we can set the version and it is a String.
- // But use the default version since update this place every time anyway.
- version = (version as String)
-}
tasks.named<org.jetbrains.kotlin.gradle.targets.js.npm.LockCopyTask>("kotlinStorePackageLock") {
//A little hacky way to make yarn results
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/wasm-wasi-js-with-wasi-only-dependency/app/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/wasm-wasi-js-with-wasi-only-dependency/app/build.gradle.kts
index d168878..2a951a2 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/wasm-wasi-js-with-wasi-only-dependency/app/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/wasm-wasi-js-with-wasi-only-dependency/app/build.gradle.kts
@@ -26,4 +26,6 @@
}
}
}
-}
\ No newline at end of file
+}
+
+the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec>().version.set("20.2.0")
\ No newline at end of file
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/wasm-wasi-js-with-wasi-only-dependency/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/wasm-wasi-js-with-wasi-only-dependency/build.gradle.kts
index c098664..314f57f 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/wasm-wasi-js-with-wasi-only-dependency/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/wasm-wasi-js-with-wasi-only-dependency/build.gradle.kts
@@ -3,20 +3,12 @@
}
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
- rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "20.2.0"
-
tasks.named<org.jetbrains.kotlin.gradle.targets.js.npm.LockCopyTask>("kotlinStorePackageLock") {
//A little hacky way to make yarn results
inputFile.fileValue(projectDir.resolve("packageLockStub"))
}
}
-rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.d8.D8Plugin> {
- // Test that we can set the version and it is a String.
- // But use the default version since update this place every time anyway.
- rootProject.the<org.jetbrains.kotlin.gradle.targets.js.d8.D8RootExtension>().version = (version as String)
-}
-
allprojects {
repositories {
mavenLocal()
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/wasm-wasi-js-with-wasi-only-dependency/lib/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/wasm-wasi-js-with-wasi-only-dependency/lib/build.gradle.kts
index ec6fe49..ffcea5d 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/wasm-wasi-js-with-wasi-only-dependency/lib/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/wasm-wasi-js-with-wasi-only-dependency/lib/build.gradle.kts
@@ -8,3 +8,5 @@
nodejs {}
}
}
+
+the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec>().version.set("20.2.0")
\ No newline at end of file
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/yarn-setup/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/yarn-setup/build.gradle.kts
index 5a1e8ca..334ad04 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/yarn-setup/build.gradle.kts
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/yarn-setup/build.gradle.kts
@@ -1,8 +1,8 @@
+import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootEnvSpec
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnSetupTask
-import org.jetbrains.kotlin.gradle.targets.js.yarn.yarn
plugins {
- kotlin("js")
+ kotlin("multiplatform")
}
group = "com.example"
@@ -13,12 +13,15 @@
mavenCentral()
}
-yarn
+kotlin.js {
+ nodejs()
+}
tasks {
+ val yarnSpec = project.the<YarnRootEnvSpec>()
val yarnFolderRemove by registering {
doLast {
- yarn.installationDir.deleteRecursively()
+ yarnSpec.installationDirectory.get().asFile.deleteRecursively()
}
}
@@ -26,7 +29,7 @@
dependsOn(getByName("kotlinYarnSetup"))
doLast {
- if (!yarn.installationDir.exists()) {
+ if (!yarnSpec.installationDirectory.get().asFile.exists()) {
throw GradleException()
}
}
@@ -36,21 +39,9 @@
dependsOn(getByName("kotlinYarnSetup"))
doLast {
- if (!yarn.installationDir.resolve("yarn-v1.9.3").exists()) {
+ if (!yarnSpec.installationDirectory.get().file("yarn-v1.9.3").asFile.exists()) {
throw GradleException()
}
}
}
-}
-
-kotlin.sourceSets {
- getByName("main") {
- dependencies {
- implementation(kotlin("stdlib-js"))
- }
- }
-}
-
-kotlin.js {
- nodejs()
}
\ No newline at end of file
diff --git a/libraries/tools/kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api b/libraries/tools/kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api
index d777ede..42347aa 100644
--- a/libraries/tools/kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api
+++ b/libraries/tools/kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api
@@ -2444,7 +2444,6 @@
public final class org/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilerAttribute : java/lang/Enum, java/io/Serializable, org/gradle/api/Named {
public static final field Companion Lorg/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilerAttribute$Companion;
- public static final field both Lorg/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilerAttribute;
public static final field ir Lorg/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilerAttribute;
public static final field legacy Lorg/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilerAttribute;
public fun getName ()Ljava/lang/String;
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinMultiplatformExtension.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinMultiplatformExtension.kt
index 614f221..45a062b 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinMultiplatformExtension.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinMultiplatformExtension.kt
@@ -52,7 +52,10 @@
final override val targets: NamedDomainObjectCollection<KotlinTarget> = project.container(KotlinTarget::class.java)
- @Deprecated("Because only the IR compiler is left, it's no longer necessary to know about the compiler type in properties")
+ @Deprecated(
+ "Because only the IR compiler is left, it's no longer necessary to know about the compiler type in properties. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
override val compilerTypeFromProperties: KotlinJsCompilerType? = null
internal suspend fun awaitTargets(): NamedDomainObjectCollection<KotlinTarget> {
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/diagnostics/checkers/KotlinTargetAlreadyDeclaredChecker.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/diagnostics/checkers/KotlinTargetAlreadyDeclaredChecker.kt
index 282a11a..b44847e 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/diagnostics/checkers/KotlinTargetAlreadyDeclaredChecker.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/diagnostics/checkers/KotlinTargetAlreadyDeclaredChecker.kt
@@ -53,7 +53,7 @@
/**
* DSL names are taken from [org.jetbrains.kotlin.gradle.dsl.KotlinTargetContainerWithPresetFunctions]
*/
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
private val KotlinTarget.targetDslFunctionName
get() = when (internal._preset) {
is KotlinJsIrTargetPreset -> "js"
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/MetadataDependencyTransformationTask.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/MetadataDependencyTransformationTask.kt
index e39d08c..edf3ab3 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/MetadataDependencyTransformationTask.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/MetadataDependencyTransformationTask.kt
@@ -32,7 +32,11 @@
/* Keep typealias for source compatibility */
@Suppress("unused")
-@Deprecated("Task was renamed to MetadataDependencyTransformationTask", replaceWith = ReplaceWith("MetadataDependencyTransformationTask"))
+@Deprecated(
+ "Task was renamed to MetadataDependencyTransformationTask. Scheduled for removal in Kotlin 2.3.",
+ replaceWith = ReplaceWith("MetadataDependencyTransformationTask"),
+ level = DeprecationLevel.ERROR
+)
typealias TransformKotlinGranularMetadata = MetadataDependencyTransformationTask
internal const val TRANSFORM_ALL_SOURCESETS_DEPENDENCIES_METADATA = "transformDependenciesMetadata"
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/ModuleIds.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/ModuleIds.kt
index fa1b58f..2bff231 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/ModuleIds.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/ModuleIds.kt
@@ -19,7 +19,7 @@
internal object ModuleIds {
fun fromDependency(dependency: Dependency): ModuleDependencyIdentifier = when (dependency) {
- is ProjectDependency -> @Suppress("DEPRECATION") idOfRootModule(dependency.dependencyProject)
+ is ProjectDependency -> @Suppress("DEPRECATION", "DEPRECATION_ERROR") idOfRootModule(dependency.dependencyProject)
else -> ModuleDependencyIdentifier(dependency.group, dependency.name)
}
@@ -41,7 +41,11 @@
fromComponentId(thisProject, component.id)
// TODO KT-62911: Replace unsafe idOfRootModule with suspendable version idRootModule
- @Deprecated("Use suspendable version if possible", replaceWith = ReplaceWith("idOfRootModuleSafe(project)"))
+ @Deprecated(
+ "Use suspendable version if possible. Scheduled for removal in Kotlin 2.3.",
+ replaceWith = ReplaceWith("idOfRootModuleSafe(project)"),
+ level = DeprecationLevel.ERROR
+ )
fun idOfRootModule(project: Project): ModuleDependencyIdentifier = project.future { idOfRootModuleSafe(project) }.getOrThrow()
suspend fun idOfRootModuleSafe(project: Project): ModuleDependencyIdentifier =
@@ -58,6 +62,6 @@
ModuleDependencyIdentifier(null, name)
private fun idOfRootModuleByProjectPath(thisProject: Project, projectPath: String): ModuleDependencyIdentifier =
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
idOfRootModule(thisProject.project(projectPath))
}
\ No newline at end of file
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/compilationImpl/KotlinCompilationLanguageSettingsConfigurator.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/compilationImpl/KotlinCompilationLanguageSettingsConfigurator.kt
index 14ea5c9..1527f0f 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/compilationImpl/KotlinCompilationLanguageSettingsConfigurator.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/compilationImpl/KotlinCompilationLanguageSettingsConfigurator.kt
@@ -21,7 +21,7 @@
) return
// Ignoring jsLegacy as it shares a source set with jsIR
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
if (compilation.platformType == KotlinPlatformType.js &&
compilation.target is org.jetbrains.kotlin.gradle.targets.js.KotlinJsTarget
) return
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractSettings.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractSettings.kt
index 6302617..16fc8fc 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractSettings.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractSettings.kt
@@ -7,7 +7,10 @@
abstract class AbstractSettings<Env : AbstractEnv> : ConfigurationPhaseAware<Env>() {
- @Deprecated("This property has been migrated to support the Provider API. Use corresponding spec (extension with name *Spec) instead. This will be removed in version 2.2.")
+ @Deprecated(
+ "This property has been migrated to support the Provider API. Use corresponding spec (extension with name *Spec) instead. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
var download: Boolean
get() = downloadProperty.get()
set(value) {
@@ -16,7 +19,10 @@
internal abstract val downloadProperty: org.gradle.api.provider.Property<Boolean>
- @Deprecated("This property has been migrated to support the Provider API. Use downloadBaseUrlProperty instead. This will be removed in version 2.2.")
+ @Deprecated(
+ "This property has been migrated to support the Provider API. Use downloadBaseUrlProperty instead. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
var downloadBaseUrl: String?
get() = downloadBaseUrlProperty.getOrNull()
set(value) {
@@ -25,7 +31,10 @@
internal abstract val downloadBaseUrlProperty: org.gradle.api.provider.Property<String>
- @Deprecated("This property has been migrated to support the Provider API. Use corresponding spec (extension with name *Spec) instead. This will be removed in version 2.2.")
+ @Deprecated(
+ "This property has been migrated to support the Provider API. Use corresponding spec (extension with name *Spec) instead. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
var installationDir: File
get() = installationDirectory.getFile()
set(value) {
@@ -34,7 +43,10 @@
internal abstract val installationDirectory: DirectoryProperty
- @Deprecated("This property has been migrated to support the Provider API. Use corresponding spec (extension with name *Spec) instead. This will be removed in version 2.2.")
+ @Deprecated(
+ "This property has been migrated to support the Provider API. Use corresponding spec (extension with name *Spec) instead. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
var version: String
get() = versionProperty.get()
set(value) {
@@ -43,7 +55,10 @@
internal abstract val versionProperty: org.gradle.api.provider.Property<String>
- @Deprecated("This property has been migrated to support the Provider API. Use corresponding spec (extension with name *Spec) instead. This will be removed in version 2.2.")
+ @Deprecated(
+ "This property has been migrated to support the Provider API. Use corresponding spec (extension with name *Spec) instead. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
var command: String
get() = commandProperty.get()
set(value) {
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractSetupTask.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractSetupTask.kt
index 2c2753d..2c37d94 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractSetupTask.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractSetupTask.kt
@@ -53,7 +53,10 @@
@get:Input
internal val ivyDependencyProvider: Provider<String> = env.map { it.ivyDependency }
- @Deprecated("Use ivyDependencyProvider instead. It uses Gradle Provider API.")
+ @Deprecated(
+ "Use ivyDependencyProvider instead. It uses Gradle Provider API. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
val ivyDependency: String
@Internal get() = ivyDependencyProvider.get()
@@ -68,7 +71,10 @@
it.allowInsecureProtocol
}
- @Deprecated("Use downloadBaseUrlProvider instead. It uses Gradle Provider API.")
+ @Deprecated(
+ "Use downloadBaseUrlProvider instead. It uses Gradle Provider API. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
val downloadBaseUrl: String?
@Internal
get() = downloadBaseUrlProvider.orNull
@@ -80,7 +86,10 @@
it.disallowChanges()
}
- @Deprecated("Use destinationProvider instead. It uses Gradle Provider API.")
+ @Deprecated(
+ "Use destinationProvider instead. It uses Gradle Provider API. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
val destination: File
@Internal get() = destinationProvider.getFile()
@@ -95,7 +104,10 @@
it.disallowChanges()
}
- @Deprecated("Use destinationHashFileProvider instead. It uses Gradle Provider API.")
+ @Deprecated(
+ "Use destinationHashFileProvider instead. It uses Gradle Provider API. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
val destinationHashFile: File
@Internal get() = destinationHashFileProvider.getFile()
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilationFactory.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilationFactory.kt
index 8974cb1..9cc3047 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilationFactory.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilationFactory.kt
@@ -8,5 +8,5 @@
import org.jetbrains.kotlin.gradle.targets.js.ir.KotlinJsIrCompilationFactory
-@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued")
+@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued", level = DeprecationLevel.ERROR)
typealias KotlinJsCompilationFactory = KotlinJsIrCompilationFactory
\ No newline at end of file
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilerAttribute.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilerAttribute.kt
index ffbfeea..fca0fc6 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilerAttribute.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsCompilerAttribute.kt
@@ -14,9 +14,7 @@
enum class KotlinJsCompilerAttribute : Named, Serializable {
legacy,
ir,
-
- @Deprecated("This value is not used in Gradle plugin. You don't need to use it. It will be removed in next major.")
- both;
+ ;
override fun getName(): String =
name
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsTarget.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsTarget.kt
index 2c77a6c..fe1ccb6 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsTarget.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsTarget.kt
@@ -8,7 +8,7 @@
import org.jetbrains.kotlin.gradle.plugin.KotlinTarget
import org.jetbrains.kotlin.gradle.plugin.mpp.InternalKotlinTarget
-@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued", level = DeprecationLevel.WARNING)
+@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued", level = DeprecationLevel.ERROR)
abstract class KotlinJsTarget : KotlinTarget, InternalKotlinTarget {
@Deprecated("Only for compatibility")
val irTarget = null
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsTargetConfigurator.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsTargetConfigurator.kt
index 941eb52..a330245 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsTargetConfigurator.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsTargetConfigurator.kt
@@ -7,5 +7,5 @@
import org.jetbrains.kotlin.gradle.targets.js.ir.KotlinJsIrTargetConfigurator
-@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued")
+@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued", level = DeprecationLevel.ERROR)
typealias KotlinJsTargetConfigurator = KotlinJsIrTargetConfigurator
\ No newline at end of file
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsTargetPreset.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsTargetPreset.kt
index cacb34b..8272191 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsTargetPreset.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/KotlinJsTargetPreset.kt
@@ -11,14 +11,14 @@
import org.gradle.api.Project
import org.jetbrains.kotlin.gradle.targets.js.ir.KotlinJsIrCompilation
-@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued", level = DeprecationLevel.WARNING)
+@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued", level = DeprecationLevel.ERROR)
abstract class KotlinJsTargetPreset(
project: Project
) : KotlinOnlyTargetPreset<KotlinOnlyTarget<KotlinJsIrCompilation>, KotlinJsIrCompilation>(
project
)
-@Suppress("DEPRECATION")
+@Suppress("DEPRECATION_ERROR")
@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued", level = DeprecationLevel.HIDDEN)
abstract class KotlinJsSingleTargetPreset(
project: Project
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8Exec.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8Exec.kt
index 3389cee..68a96c7 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8Exec.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8Exec.kt
@@ -72,7 +72,11 @@
}
}
- @Deprecated("Use register instead", ReplaceWith("register(compilation, name, configuration)"))
+ @Deprecated(
+ "Use register instead. Scheduled for removal in Kotlin 2.3.",
+ ReplaceWith("register(compilation, name, configuration)"),
+ level = DeprecationLevel.ERROR
+ )
fun create(
compilation: KotlinJsIrCompilation,
name: String,
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8RootPlugin.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8RootPlugin.kt
index 762f833..83d441e 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8RootPlugin.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8RootPlugin.kt
@@ -8,6 +8,10 @@
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
// To be compatible with previous KGP version, we need to keep D8RootPlugin as deprecated.
-@Deprecated("This type is deprecated. Use D8Plugin instead.", ReplaceWith("D8Plugin"))
+@Deprecated(
+ "This type is deprecated. Use D8Plugin instead. Scheduled for removal in Kotlin 2.3.",
+ ReplaceWith("D8Plugin"),
+ level = DeprecationLevel.ERROR
+)
@OptIn(ExperimentalWasmDsl::class)
typealias D8RootPlugin = D8Plugin
\ No newline at end of file
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/dsl/Distribution.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/dsl/Distribution.kt
index e111ddf..86f6086 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/dsl/Distribution.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/dsl/Distribution.kt
@@ -10,12 +10,20 @@
import java.io.File
interface Distribution {
- @Deprecated("Use `distributionName` instead", ReplaceWith("distributionName"))
+ @Deprecated(
+ "Use `distributionName` instead. Scheduled for removal in Kotlin 2.3.",
+ ReplaceWith("distributionName"),
+ level = DeprecationLevel.ERROR
+ )
var name: String?
val distributionName: Property<String>
- @Deprecated("Use `outputDirectory` instead", ReplaceWith("outputDirectory"))
+ @Deprecated(
+ "Use `outputDirectory` instead. Scheduled for removal in Kotlin 2.3.",
+ ReplaceWith("outputDirectory"),
+ level = DeprecationLevel.ERROR
+ )
var directory: File
val outputDirectory: DirectoryProperty
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/dsl/KotlinJsTargetDsl.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/dsl/KotlinJsTargetDsl.kt
index 367991a..6ccda47 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/dsl/KotlinJsTargetDsl.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/dsl/KotlinJsTargetDsl.kt
@@ -56,7 +56,7 @@
HasBinaries<KotlinJsBinaryContainer>,
HasConfigurableKotlinCompilerOptions<KotlinJsCompilerOptions> {
- @Deprecated("Use outputModuleName with Provider API instead")
+ @Deprecated("Use outputModuleName with Provider API instead. Scheduled for removal in Kotlin 2.3.", level = DeprecationLevel.ERROR)
var moduleName: String?
/**
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/dsl/KotlinWasmTargetDsl.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/dsl/KotlinWasmTargetDsl.kt
index 60dbf01..5ed20e8 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/dsl/KotlinWasmTargetDsl.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/dsl/KotlinWasmTargetDsl.kt
@@ -17,15 +17,24 @@
interface KotlinWasmTargetDsl : KotlinTarget, HasBinaries<KotlinJsBinaryContainer> {
val wasmTargetType: KotlinWasmTargetType?
- @Suppress("DEPRECATION")
- @Deprecated("Binaryen is enabled by default. This call is redundant.")
+ @Suppress("DEPRECATION_ERROR")
+ @Deprecated(
+ "Binaryen is enabled by default. This call is redundant. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
fun applyBinaryen() = applyBinaryen { }
- @Deprecated("Binaryen is enabled by default. This call is redundant.")
+ @Deprecated(
+ "Binaryen is enabled by default. This call is redundant. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
fun applyBinaryen(body: BinaryenExec.() -> Unit)
- @Suppress("DEPRECATION")
- @Deprecated("Binaryen is enabled by default. This call is redundant.")
+ @Suppress("DEPRECATION_ERROR")
+ @Deprecated(
+ "Binaryen is enabled by default. This call is redundant. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
fun applyBinaryen(fn: Action<BinaryenExec>) {
applyBinaryen {
fn.execute(this)
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/ir/KotlinJsIrTarget.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/ir/KotlinJsIrTarget.kt
index 4fe8685..3369e0c 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/ir/KotlinJsIrTarget.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/ir/KotlinJsIrTarget.kt
@@ -63,7 +63,7 @@
override var wasmTargetType: KotlinWasmTargetType? = null
internal set
- @Deprecated("Use outputModuleName with Provider API instead")
+ @Deprecated("Use outputModuleName with Provider API instead. Scheduled for removal in Kotlin 2.3.", level = DeprecationLevel.ERROR)
override var moduleName: String?
get() = outputModuleName.get()
set(value) {
@@ -196,7 +196,10 @@
}
}
- @Deprecated("Binaryen is enabled by default. This call is redundant.")
+ @Deprecated(
+ "Binaryen is enabled by default. This call is redundant. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
+ )
override fun applyBinaryen(body: BinaryenExec.() -> Unit) {
}
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv.kt
index de1ea50..97595a3 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv.kt
@@ -20,7 +20,7 @@
val isWindows: Boolean
get() = platformName == "win"
- @Deprecated("Use executable instead", ReplaceWith("executable"))
+ @Deprecated("Use executable instead. Scheduled for removal in Kotlin 2.3.", ReplaceWith("executable"), level = DeprecationLevel.ERROR)
val nodeExecutable
get() = executable
}
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsPlugin.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsPlugin.kt
index 5397b6e..953d2e9 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsPlugin.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsPlugin.kt
@@ -31,7 +31,7 @@
}
}
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
private fun Project.createNodeJsEnvSpec(
nodeJsConstructor: () -> NodeJsRootExtension,
): NodeJsEnvSpec {
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsRootExtension.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsRootExtension.kt
index 87c58bc..107990a 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsRootExtension.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsRootExtension.kt
@@ -51,52 +51,60 @@
@Deprecated(
"Use installationDir from NodeJsEnvSpec (not NodeJsRootExtension) instead. " +
- "You can find this extension after applying NodeJsPlugin. This will be removed in 2.2"
+ "You can find this extension after applying NodeJsPlugin. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR,
)
var installationDir: File = gradleHome.resolve("nodejs")
@Deprecated(
"Use download from NodeJsEnvSpec (not NodeJsRootExtension) instead. " +
- "You can find this extension after applying NodeJsPlugin. This will be removed in 2.2"
+ "You can find this extension after applying NodeJsPlugin. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR,
)
var download = true
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
@Deprecated(
"Use downloadBaseUrl from NodeJsEnvSpec (not NodeJsRootExtension) instead. " +
- "You can find this extension after applying NodeJsPlugin. This will be removed in 2.2"
+ "You can find this extension after applying NodeJsPlugin. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR,
)
var nodeDownloadBaseUrl by ::downloadBaseUrl
@Deprecated(
"Use downloadBaseUrl from NodeJsEnvSpec (not NodeJsRootExtension) instead. " +
- "You can find this extension after applying NodeJsPlugin. This will be removed in 2.2"
+ "You can find this extension after applying NodeJsPlugin. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR,
)
var downloadBaseUrl: String? = "https://nodejs.org/dist"
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
@Deprecated(
"Use version from NodeJsEnvSpec (not NodeJsRootExtension) instead. " +
- "You can find this extension after applying NodeJsPlugin. This will be removed in 2.2"
+ "You can find this extension after applying NodeJsPlugin. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR,
)
var nodeVersion by ::version
@Deprecated(
- "Use downloadBaseUrl from NodeJsEnvSpec (not NodeJsRootExtension) instead. " +
- "You can find this extension after applying NodeJsPlugin. This will be removed in 2.2"
+ "Use version from NodeJsEnvSpec (not NodeJsRootExtension) instead. " +
+ "You can find this extension after applying NodeJsPlugin. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR,
)
var version = "22.13.0"
@Deprecated(
"Use command from NodeJsEnvSpec (not NodeJsRootExtension) instead. " +
- "You can find this extension after applying NodeJsPlugin. This will be removed in 2.2"
+ "You can find this extension after applying NodeJsPlugin. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR,
)
var command = "node"
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
@Deprecated(
"Use command from NodeJsEnvSpec (not NodeJsRootExtension) instead. " +
- "You can find this extension after applying NodeJsPlugin. This will be removed in 2.2"
+ "You can find this extension after applying NodeJsPlugin. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR,
)
var nodeCommand by ::command
@@ -134,14 +142,15 @@
@Deprecated(
"Use nodeJsSetupTaskProvider from NodeJsEnvSpec (not NodeJsRootExtension) instead. " +
- "You can find this extension after applying NodeJsPlugin"
+ "You can find this extension after applying NodeJsPlugin. Scheduled for removal in Kotlin 2.3.",
+ level = DeprecationLevel.ERROR
)
val nodeJsSetupTaskProvider: TaskProvider<out NodeJsSetupTask>
get() = with(nodeJs()) {
project.nodeJsSetupTaskProvider
}
- @Deprecated("Use NodeJsEnvSpec instead. This will be removed in 2.2")
+ @Deprecated("Use NodeJsEnvSpec instead. Scheduled for removal in Kotlin 2.3.", level = DeprecationLevel.ERROR)
fun requireConfigured(): NodeJsEnv {
return nodeJs().env.get()
}
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm/NpmDependencyExtension.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm/NpmDependencyExtension.kt
index 2faf6d4..97cc5d4 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm/NpmDependencyExtension.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm/NpmDependencyExtension.kt
@@ -28,7 +28,10 @@
}
interface NpmDependencyWithExternalsExtension : BaseNpmDependencyExtension {
- @Deprecated("Dukat integration is in redesigning process. Now it does not work.")
+ @Deprecated(
+ "Dukat integration is being reevaluated. It currently does not work. See KT-54395. Scheduled for removal in Kotlin 2.3..",
+ level = DeprecationLevel.ERROR
+ )
operator fun invoke(
name: String,
version: String,
@@ -37,14 +40,20 @@
}
interface NpmDirectoryDependencyWithExternalsExtension : NpmDirectoryDependencyExtension {
- @Deprecated("Dukat integration is in redesigning process. Now it does not work.")
+ @Deprecated(
+ "Dukat integration is being reevaluated. It currently does not work. See KT-54395. Scheduled for removal in Kotlin 2.3..",
+ level = DeprecationLevel.ERROR
+ )
operator fun invoke(
name: String,
directory: File,
generateExternals: Boolean
): NpmDependency
- @Deprecated("Dukat integration is in redesigning process. Now it does not work.")
+ @Deprecated(
+ "Dukat integration is being reevaluated. It currently does not work. See KT-54395. Scheduled for removal in Kotlin 2.3..",
+ level = DeprecationLevel.ERROR
+ )
operator fun invoke(
directory: File,
generateExternals: Boolean
@@ -208,21 +217,30 @@
override fun invoke(name: String, version: String): NpmDependency =
delegate.invoke(name, version)
- @Deprecated("Dukat integration is in redesigning process. Now it does not work.")
+ @Deprecated(
+ "Dukat integration is being reevaluated. It currently does not work. See KT-54395. Scheduled for removal in Kotlin 2.3..",
+ level = DeprecationLevel.ERROR
+ )
override fun invoke(name: String, version: String, generateExternals: Boolean): NpmDependency {
@Suppress("deprecation_error")
warnNpmGenerateExternals(project.logger)
return invoke(name, version)
}
- @Deprecated("Dukat integration is in redesigning process. Now it does not work.")
+ @Deprecated(
+ "Dukat integration is being reevaluated. It currently does not work. See KT-54395. Scheduled for removal in Kotlin 2.3..",
+ level = DeprecationLevel.ERROR
+ )
override fun invoke(name: String, directory: File, generateExternals: Boolean): NpmDependency {
@Suppress("deprecation_error")
warnNpmGenerateExternals(project.logger)
return invoke(name, directory)
}
- @Deprecated("Dukat integration is in redesigning process. Now it does not work.")
+ @Deprecated(
+ "Dukat integration is being reevaluated. It currently does not work. See KT-54395. Scheduled for removal in Kotlin 2.3..",
+ level = DeprecationLevel.ERROR
+ )
override fun invoke(directory: File, generateExternals: Boolean): NpmDependency {
@Suppress("deprecation_error")
warnNpmGenerateExternals(project.logger)
@@ -269,21 +287,30 @@
project,
scope,
) {
- @Deprecated("Dukat integration is in redesigning process. Now it does not work.")
+ @Deprecated(
+ "Dukat integration is being reevaluated. It currently does not work. See KT-54395. Scheduled for removal in Kotlin 2.3..",
+ level = DeprecationLevel.ERROR
+ )
override fun invoke(directory: File, generateExternals: Boolean): NpmDependency {
@Suppress("deprecation_error")
warnNpmGenerateExternals(project.logger)
return invoke(directory)
}
- @Deprecated("Dukat integration is in redesigning process. Now it does not work.")
+ @Deprecated(
+ "Dukat integration is being reevaluated. It currently does not work. See KT-54395. Scheduled for removal in Kotlin 2.3..",
+ level = DeprecationLevel.ERROR
+ )
override fun invoke(name: String, version: String, generateExternals: Boolean): NpmDependency {
@Suppress("deprecation_error")
warnNpmGenerateExternals(project.logger)
return invoke(name, version)
}
- @Deprecated("Dukat integration is in redesigning process. Now it does not work.")
+ @Deprecated(
+ "Dukat integration is being reevaluated. It currently does not work. See KT-54395. Scheduled for removal in Kotlin 2.3..",
+ level = DeprecationLevel.ERROR
+ )
override fun invoke(name: String, directory: File, generateExternals: Boolean): NpmDependency {
@Suppress("deprecation_error")
warnNpmGenerateExternals(project.logger)
@@ -343,21 +370,30 @@
project,
PEER,
) {
- @Deprecated("Dukat integration is in redesigning process. Now it does not work.")
+ @Deprecated(
+ "Dukat integration is being reevaluated. It currently does not work. See KT-54395. Scheduled for removal in Kotlin 2.3..",
+ level = DeprecationLevel.ERROR
+ )
override fun invoke(directory: File, generateExternals: Boolean): NpmDependency {
@Suppress("deprecation_error")
warnNpmGenerateExternals(project.logger)
return invoke(directory)
}
- @Deprecated("Dukat integration is in redesigning process. Now it does not work.")
+ @Deprecated(
+ "Dukat integration is being reevaluated. It currently does not work. See KT-54395. Scheduled for removal in Kotlin 2.3..",
+ level = DeprecationLevel.ERROR
+ )
override fun invoke(name: String, version: String, generateExternals: Boolean): NpmDependency {
@Suppress("deprecation_error")
warnNpmGenerateExternals(project.logger)
return invoke(name, version)
}
- @Deprecated("Dukat integration is in redesigning process. Now it does not work.")
+ @Deprecated(
+ "Dukat integration is being reevaluated. It currently does not work. See KT-54395. Scheduled for removal in Kotlin 2.3..",
+ level = DeprecationLevel.ERROR
+ )
override fun invoke(name: String, directory: File, generateExternals: Boolean): NpmDependency {
@Suppress("deprecation_error")
warnNpmGenerateExternals(project.logger)
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm/NpmProject.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm/NpmProject.kt
index 661360a..f0f7c0a 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm/NpmProject.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm/NpmProject.kt
@@ -25,7 +25,7 @@
val KotlinJsIrCompilation.npmProject: NpmProject
get() = NpmProject(this)
-@Deprecated("Use npmProject for KotlinJsIrCompilation")
+@Deprecated("Use npmProject for KotlinJsIrCompilation. Scheduled for removal in Kotlin 2.3.", level = DeprecationLevel.ERROR)
val KotlinJsCompilation.npmProject: NpmProject
get() = NpmProject(this as KotlinJsIrCompilation)
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/DefaultDistribution.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/DefaultDistribution.kt
index 874bdf8..6b4641e 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/DefaultDistribution.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/DefaultDistribution.kt
@@ -37,14 +37,14 @@
private val targetName: Property<String>,
override val distributionName: Property<String>,
) : Distribution {
- @Deprecated("Use `distributionName` instead", ReplaceWith("distributionName"))
+ @Deprecated("Use `distributionName` instead. Scheduled for removal in Kotlin 2.3.", ReplaceWith("distributionName"), level = DeprecationLevel.ERROR)
override var name: String?
get() = distributionName.orNull
set(value) {
distributionName.set(value)
}
- @Deprecated("Use `outputDirectory` instead", ReplaceWith("outputDirectory"))
+ @Deprecated("Use `outputDirectory` instead. Scheduled for removal in Kotlin 2.3.", ReplaceWith("outputDirectory"), level = DeprecationLevel.ERROR)
override var directory: File
get() = outputDirectory.get().asFile
set(value) {
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/KotlinBrowserJs.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/KotlinBrowserJs.kt
index 3f3adb6..c9515f4 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/KotlinBrowserJs.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/KotlinBrowserJs.kt
@@ -7,7 +7,7 @@
import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsBrowserDsl
-@Suppress("DEPRECATION")
+@Suppress("DEPRECATION_ERROR")
@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued", level = DeprecationLevel.HIDDEN)
abstract class KotlinBrowserJs :
KotlinJsSubTarget(),
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/KotlinJsSubTarget.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/KotlinJsSubTarget.kt
index 5caf1b3..fcc6c5c 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/KotlinJsSubTarget.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/KotlinJsSubTarget.kt
@@ -7,5 +7,5 @@
import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsSubTargetDsl
-@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued", level = DeprecationLevel.WARNING)
+@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued", level = DeprecationLevel.ERROR)
abstract class KotlinJsSubTarget : KotlinJsSubTargetDsl
\ No newline at end of file
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/KotlinNodeJs.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/KotlinNodeJs.kt
index 983209a..cae0e7c 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/KotlinNodeJs.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/subtargets/KotlinNodeJs.kt
@@ -7,7 +7,7 @@
import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsNodeDsl
-@Suppress("DEPRECATION")
+@Suppress("DEPRECATION_ERROR")
@Deprecated("The Kotlin/JS legacy target is deprecated and its support completely discontinued", level = DeprecationLevel.HIDDEN)
abstract class KotlinNodeJs :
KotlinJsSubTarget(),
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/testing/KotlinJsTest.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/testing/KotlinJsTest.kt
index 7a6f61e..c3743d1 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/testing/KotlinJsTest.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/testing/KotlinJsTest.kt
@@ -103,13 +103,13 @@
override val requiredNpmDependencies: Set<RequiredKotlinJsDependency>
@Internal get() = testFramework!!.requiredNpmDependencies
- @Deprecated("Use useMocha instead", ReplaceWith("useMocha()"))
+ @Deprecated("Use useMocha instead. Scheduled for removal in Kotlin 2.3.", ReplaceWith("useMocha()"), level = DeprecationLevel.ERROR)
fun useNodeJs() = useMocha()
- @Deprecated("Use useMocha instead", ReplaceWith("useMocha(body)"))
+ @Deprecated("Use useMocha instead. Scheduled for removal in Kotlin 2.3.", ReplaceWith("useMocha(body)"), level = DeprecationLevel.ERROR)
fun useNodeJs(body: KotlinMocha.() -> Unit) = useMocha(body)
- @Deprecated("Use useMocha instead", ReplaceWith("useMocha(fn)"))
+ @Deprecated("Use useMocha instead. Scheduled for removal in Kotlin 2.3.", ReplaceWith("useMocha(fn)"), level = DeprecationLevel.ERROR)
fun useNodeJs(fn: Action<KotlinMocha>) {
useMocha {
fn.execute(this)
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/webpack/KotlinWebpack.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/webpack/KotlinWebpack.kt
index 89cff02..820d265 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/webpack/KotlinWebpack.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/webpack/KotlinWebpack.kt
@@ -137,7 +137,11 @@
)
@get:Internal
- @Deprecated("Use `outputDirectory` instead", ReplaceWith("outputDirectory"))
+ @Deprecated(
+ "Use `outputDirectory` instead. Scheduled for removal in Kotlin 2.3.",
+ ReplaceWith("outputDirectory"),
+ level = DeprecationLevel.ERROR
+ )
var destinationDirectory: File
get() = outputDirectory.asFile.get()
set(value) {
@@ -149,7 +153,11 @@
abstract val outputDirectory: DirectoryProperty
@get:Internal
- @Deprecated("Use `mainOutputFileName` instead", ReplaceWith("mainOutputFileName"))
+ @Deprecated(
+ "Use `mainOutputFileName` instead. Scheduled for removal in Kotlin 2.3.",
+ ReplaceWith("mainOutputFileName"),
+ level = DeprecationLevel.ERROR
+ )
var outputFileName: String
get() = mainOutputFileName.get()
set(value) {
@@ -160,7 +168,11 @@
abstract val mainOutputFileName: Property<String>
@get:Internal
- @Deprecated("Use `mainOutputFile` instead", ReplaceWith("mainOutputFile"))
+ @Deprecated(
+ "Use `mainOutputFile` instead. Scheduled for removal in Kotlin 2.3.",
+ ReplaceWith("mainOutputFile"),
+ level = DeprecationLevel.ERROR
+ )
open val outputFile: File
get() = mainOutputFile.get().asFile
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnPlugin.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnPlugin.kt
index 4a8117b..dd5f6ed 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnPlugin.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnPlugin.kt
@@ -136,7 +136,8 @@
yarnRootExtension: YarnRootExtension,
) {
download.convention(yarnRootExtension.downloadProperty)
- downloadBaseUrl.convention(yarnRootExtension.downloadBaseUrlProperty)
+ // set instead of convention because it is possible to have null value
+ downloadBaseUrl.set(yarnRootExtension.downloadBaseUrlProperty)
allowInsecureProtocol.convention(false)
installationDirectory.convention(yarnRootExtension.installationDirectory)
version.convention(yarnRootExtension.versionProperty)
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/DefaultCInteropSettings.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/DefaultCInteropSettings.kt
index 0c46d8c..e9f09dd 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/DefaultCInteropSettings.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/DefaultCInteropSettings.kt
@@ -75,7 +75,11 @@
val interopProcessingTaskName get() = params.interopProcessingTaskName
- @Deprecated("Deprecated. Please, use definitionFile.", ReplaceWith("definitionFile"))
+ @Deprecated(
+ "Deprecated. Please, use definitionFile. Scheduled for removal in Kotlin 2.3.",
+ ReplaceWith("definitionFile"),
+ level = DeprecationLevel.ERROR
+ )
val defFileProperty: Property<File> = params.services.objectFactory.property<File>().convention(
getDefaultCinteropDefinitionFile().takeIf { it.exists() }
)
@@ -83,7 +87,7 @@
private fun getDefaultCinteropDefinitionFile(): File = params.services.projectLayout.projectDirectory.file("src/nativeInterop/cinterop/$name.def").asFile
val definitionFile: RegularFileProperty = params.services.objectFactory.fileProperty().convention(
- @Suppress("DEPRECATION") // deprecated property is used intentionally during deprecation period
+ @Suppress("DEPRECATION_ERROR") // deprecated property is used intentionally during deprecation period
params.services.projectLayout.file(defFileProperty)
)
@@ -91,7 +95,7 @@
var defFile: File
get() = definitionFile.getFile()
set(value) {
- @Suppress("DEPRECATION") // deprecated property is used intentionally during deprecation period
+ @Suppress("DEPRECATION_ERROR") // deprecated property is used intentionally during deprecation period
defFileProperty.set(value)
}
@@ -120,7 +124,7 @@
// DSL methods.
override fun defFile(file: Any) {
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
defFileProperty.set(params.services.fileOperations.file(file))
}
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/NativeBinaries.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/NativeBinaries.kt
index d293b8d..3ef9605 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/NativeBinaries.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/NativeBinaries.kt
@@ -81,18 +81,23 @@
}
/** Additional arguments passed to the Kotlin/Native compiler. */
- @Suppress("DEPRECATION")
var freeCompilerArgs: List<String>
- get() = linkTask.kotlinOptions.freeCompilerArgs
+ get() = linkTaskProvider.get().toolOptions.freeCompilerArgs.get()
set(value) {
- linkTask.kotlinOptions.freeCompilerArgs = value
+ linkTaskProvider.configure {
+ it.toolOptions.freeCompilerArgs.set(value)
+ }
}
// Link task access.
val linkTaskName: String
get() = lowerCamelCaseName("link", name, target.targetName)
- @Deprecated("Use 'linkTaskProvider' instead", ReplaceWith("linkTaskProvider"))
+ @Deprecated(
+ "Use 'linkTaskProvider' instead. Scheduled for removal in Kotlin 2.3.",
+ ReplaceWith("linkTaskProvider"),
+ level = DeprecationLevel.ERROR
+ )
val linkTask: KotlinNativeLink
get() = linkTaskProvider.get()
@@ -189,6 +194,7 @@
val runTaskProvider: TaskProvider<AbstractExecTask<*>>?
get() = runTaskName?.let { project.tasks.withType(AbstractExecTask::class.java).named(it) }
+ @Deprecated("Use `runTaskProvider` instead. Scheduled for removal in Kotlin 2.4.", ReplaceWith("runTaskProvider"))
val runTask: AbstractExecTask<*>?
get() = runTaskProvider?.get()
}
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/cocoapods/KotlinCocoapodsPlugin.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/cocoapods/KotlinCocoapodsPlugin.kt
index 5cb4726..5c7edd9 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/cocoapods/KotlinCocoapodsPlugin.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/cocoapods/KotlinCocoapodsPlugin.kt
@@ -312,7 +312,7 @@
interopTask.onlyIf { HostManager.hostIsMac }
with(interop) {
- @Suppress("DEPRECATION") // deprecated property is used intentionally during deprecation period
+ @Suppress("DEPRECATION_ERROR") // deprecated property is used intentionally during deprecation period
defFileProperty.set(defTask.flatMap { it.defFile.asFile })
_packageNameProp.set(project.provider { pod.packageName })
_extraOptsProp.addAll(project.provider { pod.extraOpts })
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/FatFrameworkTask.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/FatFrameworkTask.kt
index 87259d3..c9fc364 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/FatFrameworkTask.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/FatFrameworkTask.kt
@@ -170,7 +170,11 @@
* A parent directory for the fat framework.
*/
@get:Internal
- @Deprecated("please use destinationDirProperty", replaceWith = ReplaceWith("destinationDirProperty"))
+ @Deprecated(
+ "please use destinationDirProperty. Scheduled for removal in Kotlin 2.3.",
+ replaceWith = ReplaceWith("destinationDirProperty"),
+ level = DeprecationLevel.ERROR
+ )
var destinationDir: File
get() = destinationDirProperty.get().asFile
set(value) = destinationDirProperty.set(value)
@@ -181,7 +185,7 @@
@get:Internal
val fatFramework: File
- get() = destinationDirProperty.file(fatFrameworkName + ".framework").getFile()
+ get() = destinationDirProperty.file("$fatFrameworkName.framework").getFile()
@get:Internal
internal val frameworkLayout: FrameworkLayout
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeLink.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeLink.kt
index ffa3712..a54fada 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeLink.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeLink.kt
@@ -72,7 +72,7 @@
UsesBuildFusService
{
- @Deprecated("Visibility will be lifted to private in the future releases")
+ @Deprecated("Visibility will be lifted to private in Kotlin 2.3.", level = DeprecationLevel.ERROR)
@get:Internal
val compilation: KotlinNativeCompilation
get() = binary.compilation
@@ -82,11 +82,11 @@
override val destinationDirectory: DirectoryProperty = binary.outputDirectoryProperty
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
@get:Internal
internal val konanTarget = compilation.konanTarget
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
@get:Internal
internal val nativeDependencies = compilation.nativeDependencies
@@ -94,7 +94,7 @@
override val libraries: ConfigurableFileCollection = objectFactory.fileCollection().from(
{
// Avoid resolving these dependencies during task graph construction when we can't build the target:
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
if (konanTarget.enabledOnCurrentHostForBinariesCompilation()) compilation.compileDependencyFiles.exclude(originalPlatformLibraries())
else objectFactory.fileCollection()
}
@@ -115,7 +115,7 @@
@get:Input
internal val binaryName: String by lazyConvention { binary.name }
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
@Deprecated("Use toolOptions to configure the task")
@get:Internal
val languageSettings: LanguageSettings = compilation.defaultSourceSet.languageSettings
@@ -188,7 +188,7 @@
@get:Input
val isStaticFramework: Boolean by lazyConvention { binary.let { it is Framework && it.isStatic } }
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
@get:Input
val target: String = compilation.konanTarget.name
@@ -326,11 +326,11 @@
}
}
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
@get:Classpath
protected val friendModule: FileCollection = objectFactory.fileCollection().from({ compilation.friendPaths })
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION_ERROR")
private val resolvedConfiguration = LazyResolvedConfiguration(
project.configurations.getByName(compilation.compileDependencyConfigurationName)
)
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeTest.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeTest.kt
index d8d86d3..ab18b5c 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeTest.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeTest.kt
@@ -220,7 +220,7 @@
*/
@DisableCachingByDefault
abstract class KotlinNativeSimulatorTest : KotlinNativeTest() {
- @Deprecated("Use the property 'device' instead")
+ @Deprecated("Use the property 'device' instead. Scheduled for removal in Kotlin 2.3.", level = DeprecationLevel.ERROR)
@get:Internal
var deviceId: String
get() = device.get()
diff --git a/repo/gradle-build-conventions/d8-configuration/src/main/kotlin/d8-configuration.gradle.kts b/repo/gradle-build-conventions/d8-configuration/src/main/kotlin/d8-configuration.gradle.kts
index 4128384..6bb6b09 100644
--- a/repo/gradle-build-conventions/d8-configuration/src/main/kotlin/d8-configuration.gradle.kts
+++ b/repo/gradle-build-conventions/d8-configuration/src/main/kotlin/d8-configuration.gradle.kts
@@ -20,6 +20,6 @@
with(d8KotlinBuild) {
d8EnvSpec.version.set(project.v8Version)
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION", "DEPRECATION_ERROR")
d8Root.version = project.v8Version
}
\ No newline at end of file
diff --git a/repo/gradle-build-conventions/nodejs-configuration/src/main/kotlin/org/jetbrains/kotlin/build/nodejs/NodeJsExtension.kt b/repo/gradle-build-conventions/nodejs-configuration/src/main/kotlin/org/jetbrains/kotlin/build/nodejs/NodeJsExtension.kt
index fef7608..9bb375e 100644
--- a/repo/gradle-build-conventions/nodejs-configuration/src/main/kotlin/org/jetbrains/kotlin/build/nodejs/NodeJsExtension.kt
+++ b/repo/gradle-build-conventions/nodejs-configuration/src/main/kotlin/org/jetbrains/kotlin/build/nodejs/NodeJsExtension.kt
@@ -11,7 +11,7 @@
abstract class NodeJsExtension(
private val nodeJsRoot: NodeJsRootExtension
) {
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION", "DEPRECATION_ERROR")
fun Test.setupNodeJs() {
dependsOn(nodeJsRoot.nodeJsSetupTaskProvider)
val nodeJsExecutablePath = project.provider {