[Gradle, JS] binaries executable for legacy by default

^KT-40320 fixed
This commit is contained in:
Ilya Goncharov
2020-07-20 12:26:01 +03:00
parent f7beea10a5
commit e776444459
2 changed files with 15 additions and 0 deletions
@@ -202,6 +202,12 @@ internal class PropertiesProvider private constructor(private val project: Proje
val jsCompiler: KotlinJsCompilerType
get() = property(jsCompilerProperty)?.let { KotlinJsCompilerType.byArgumentOrNull(it) } ?: KotlinJsCompilerType.LEGACY
/**
* Use Kotlin/JS backend compiler type
*/
val jsLegacyExecutableExplicitly: Boolean
get() = booleanProperty("kotlin.js.legacy.executable.explicitly") ?: false
val stdlibDefaultDependency: Boolean
get() = booleanProperty("kotlin.stdlib.default.dependency") ?: true
@@ -136,6 +136,10 @@ constructor(
project.objects.newInstance(KotlinBrowserJs::class.java, this).also {
it.configure()
if (!PropertiesProvider(project).jsLegacyExecutableExplicitly) {
binaries.executable()
}
browserConfiguredHandlers.forEach { handler ->
handler(it)
}
@@ -158,6 +162,11 @@ constructor(
private val nodejsLazyDelegate = lazy {
project.objects.newInstance(KotlinNodeJs::class.java, this).also {
it.configure()
if (!PropertiesProvider(project).jsLegacyExecutableExplicitly) {
binaries.executable()
}
nodejsConfiguredHandlers.forEach { handler ->
handler(it)
}