[Gradle, JS] No create target on import if no target in DSL
#KT-38469 fixed
This commit is contained in:
+5
-2
@@ -196,8 +196,11 @@ open class KotlinJsProjectExtension :
|
||||
"Needed for IDE import using the MPP import mechanism",
|
||||
level = DeprecationLevel.HIDDEN
|
||||
)
|
||||
fun getTargets() =
|
||||
target.project.container(KotlinTarget::class.java).apply { add(target) }
|
||||
fun getTargets(): NamedDomainObjectContainer<KotlinTarget>? =
|
||||
_target?.let { target ->
|
||||
target.project.container(KotlinTarget::class.java)
|
||||
.apply { add(target) }
|
||||
}
|
||||
}
|
||||
|
||||
open class KotlinCommonProjectExtension : KotlinSingleJavaTargetExtension() {
|
||||
|
||||
Reference in New Issue
Block a user