Gradle, js: don't use any subtarget by default
This commit is contained in:
-10
@@ -36,16 +36,12 @@ class KotlinJsTarget(project: Project, platformType: KotlinPlatformType) :
|
||||
val runTaskName get() = lowerCamelCaseName(disambiguationClassifier, runTaskNameSuffix)
|
||||
val runTask get() = project.tasks.maybeCreate(runTaskName)
|
||||
|
||||
private var hasSubtargets = false
|
||||
|
||||
val browser by lazy {
|
||||
hasSubtargets = true
|
||||
KotlinBrowserJs(this).also {
|
||||
it.configure()
|
||||
}
|
||||
}
|
||||
val nodejs by lazy {
|
||||
hasSubtargets = true
|
||||
KotlinNodeJs(this).also {
|
||||
it.configure()
|
||||
}
|
||||
@@ -58,10 +54,4 @@ class KotlinJsTarget(project: Project, platformType: KotlinPlatformType) :
|
||||
override fun nodejs(body: KotlinJsNodeDsl.() -> Unit) {
|
||||
nodejs.body()
|
||||
}
|
||||
|
||||
fun configureDefaults() {
|
||||
if (!hasSubtargets) {
|
||||
browser()
|
||||
}
|
||||
}
|
||||
}
|
||||
-1
@@ -19,7 +19,6 @@ open class KotlinJsTargetConfigurator(kotlinPluginVersion: String) :
|
||||
override fun configureTarget(target: KotlinOnlyTarget<KotlinJsCompilation>) {
|
||||
target as KotlinJsTarget
|
||||
|
||||
target.configureDefaults()
|
||||
super.configureTarget(target)
|
||||
|
||||
target.compilations.forEach {
|
||||
|
||||
Reference in New Issue
Block a user