[Gradle, JS] Fix DSL for Gradle JS wizard

This commit is contained in:
Ilya Goncharov
2020-02-21 12:37:40 +03:00
parent 3ae6b27556
commit e631146fa7
2 changed files with 14 additions and 1 deletions
@@ -182,7 +182,16 @@ abstract class AbstractKotlinDslGradleKotlinJSFrameworkSupportProvider(
) {
super.addSupport(projectId, module, rootModel, modifiableModelsProvider, buildScriptData)
buildScriptData.addOther("kotlin.target.$jsSubTargetName { }")
buildScriptData.addOther(
"""
kotlin {
target {
$jsSubTargetName { }
produceExecutable()
}
}
""".trimIndent()
)
val artifactId = MAVEN_JS_STDLIB_ID.removePrefix("kotlin-")
buildScriptData.addDependencyNotation(composeDependency(buildScriptData, artifactId))
}
@@ -156,6 +156,10 @@ constructor(
"Only one producing type supported. Try to set $producingType but previously ${this.producingType} found"
}
if (this.producingType != null) {
return
}
this.producingType = producingType
whenBrowserConfigured {