[Gradle, JS] Deprecation of kotlin2js and kotlin-dce-js plugins
#KT-35641 fixed #KT-35611 fixed
This commit is contained in:
+8
@@ -715,6 +715,14 @@ internal open class Kotlin2JsPlugin(
|
|||||||
)
|
)
|
||||||
|
|
||||||
override fun apply(project: Project) {
|
override fun apply(project: Project) {
|
||||||
|
project.logger.warn(
|
||||||
|
"""
|
||||||
|
Please pay attention:
|
||||||
|
`kotlin2js` plugin is deprecated.
|
||||||
|
Please follow https://kotlinlang.org/docs/reference/js-project-setup.html to set up project with `org.jetbrains.kotlin.js` plugin
|
||||||
|
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
val target = KotlinWithJavaTarget<KotlinJsOptions>(project, KotlinPlatformType.js, targetName)
|
val target = KotlinWithJavaTarget<KotlinJsOptions>(project, KotlinPlatformType.js, targetName)
|
||||||
|
|
||||||
(project.kotlinExtension as Kotlin2JsProjectExtension).target = target
|
(project.kotlinExtension as Kotlin2JsProjectExtension).target = target
|
||||||
|
|||||||
+11
-1
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -20,6 +20,16 @@ import java.io.File
|
|||||||
|
|
||||||
class KotlinJsDcePlugin : Plugin<Project> {
|
class KotlinJsDcePlugin : Plugin<Project> {
|
||||||
override fun apply(project: Project) {
|
override fun apply(project: Project) {
|
||||||
|
project.logger.warn(
|
||||||
|
"""
|
||||||
|
Please pay attention:
|
||||||
|
`kotlin-dce-js` plugin is deprecated.
|
||||||
|
DCE is automatically integrated in `org.jetbrains.kotlin.js` plugin
|
||||||
|
Please follow https://kotlinlang.org/docs/reference/js-project-setup.html to set up project with `org.jetbrains.kotlin.js` plugin.
|
||||||
|
Additional information about JavaScript DCE you can fin here - https://kotlinlang.org/docs/reference/javascript-dce.html
|
||||||
|
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
val kotlinExtension =
|
val kotlinExtension =
|
||||||
project.multiplatformExtensionOrNull
|
project.multiplatformExtensionOrNull
|
||||||
?: project.extensions.getByName("kotlin") as? KotlinSingleTargetExtension
|
?: project.extensions.getByName("kotlin") as? KotlinSingleTargetExtension
|
||||||
|
|||||||
Reference in New Issue
Block a user