[gradle] Deprecate kotlin-js plugin in favor of kotlin-multiplatform
#KT-57901 Verification Pending
This commit is contained in:
committed by
Space Team
parent
e4b6f3c12a
commit
f06087d5d3
+11
-1
@@ -1652,6 +1652,16 @@ abstract class AbstractKotlin2JsGradlePluginIT(protected val irBackend: Boolean)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@DisplayName("test deprecated kotlin-js gradle plugin message reported")
|
||||
@GradleTest
|
||||
fun testDeprecatedMessageReported(gradleVersion: GradleVersion) {
|
||||
project("kotlin2JsInternalTest", gradleVersion) {
|
||||
build("help") { // just to trigger plugin registration
|
||||
assertOutputContains("w: 'kotlin-js' Gradle plugin is deprecated and will be removed in the future.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JsGradlePluginTests
|
||||
@@ -1661,7 +1671,7 @@ class GeneralKotlin2JsGradlePluginIT : KGPBaseTest() {
|
||||
fun testJsBothModeWithTests(gradleVersion: GradleVersion) {
|
||||
project("kotlin-js-both-mode-with-tests", gradleVersion) {
|
||||
build("build") {
|
||||
assertNoBuildWarnings()
|
||||
assertNoBuildWarnings(setOf("w: 'kotlin-js' Gradle plugin is deprecated and will be removed in the future."))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -57,6 +57,13 @@ open class KotlinJsPlugin: Plugin<Project> {
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
project.logger.warn(
|
||||
"""
|
||||
w: 'kotlin-js' Gradle plugin is deprecated and will be removed in the future.
|
||||
Please use 'kotlin("multiplatform")' plugin with a 'js()' target instead. See the migration guide: https://kotl.in/t6m3vu
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
// Explicitly create configurations for main and test
|
||||
|
||||
Reference in New Issue
Block a user