[Gradle, JS] Fix once initialization of produceExecutable
#KT-38055 fixed
This commit is contained in:
+2
-2
@@ -81,13 +81,13 @@ class Kotlin2JsIrGradlePluginIT : AbstractKotlin2JsGradlePluginIT(true) {
|
||||
val appProject = transformProjectWithPluginsDsl(
|
||||
projectName = "app",
|
||||
directoryPrefix = rootProjectName,
|
||||
wrapperVersion = GradleVersionRequired.AtLeast("5.3")
|
||||
wrapperVersion = GradleVersionRequired.AtLeast("5.5")
|
||||
)
|
||||
|
||||
val libProject = transformProjectWithPluginsDsl(
|
||||
projectName = "lib",
|
||||
directoryPrefix = rootProjectName,
|
||||
wrapperVersion = GradleVersionRequired.AtLeast("5.3")
|
||||
wrapperVersion = GradleVersionRequired.AtLeast("5.5")
|
||||
)
|
||||
|
||||
libProject.gradleProperties().appendText(jsCompilerType(KotlinJsCompilerType.IR))
|
||||
|
||||
+11
-4
@@ -8,10 +8,17 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
kotlin.js {
|
||||
binaries.executable()
|
||||
nodejs()
|
||||
browser()
|
||||
kotlin {
|
||||
js {
|
||||
nodejs()
|
||||
binaries.executable()
|
||||
}
|
||||
}
|
||||
kotlin {
|
||||
js {
|
||||
browser()
|
||||
binaries.executable()
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("browserTest") {
|
||||
|
||||
+5
-2
@@ -57,9 +57,12 @@ abstract class KotlinJsIrSubTarget(
|
||||
}
|
||||
}
|
||||
|
||||
internal val produceExecutable: () -> Unit by lazy {
|
||||
private val produceExecutable: Unit by lazy {
|
||||
configureMain()
|
||||
return@lazy { Unit }
|
||||
}
|
||||
|
||||
internal fun produceExecutable() {
|
||||
produceExecutable
|
||||
}
|
||||
|
||||
override fun testTask(body: KotlinJsTest.() -> Unit) {
|
||||
|
||||
+5
-1
@@ -42,10 +42,14 @@ abstract class KotlinJsSubTarget(
|
||||
|
||||
protected val taskGroupName = "Kotlin $disambiguationClassifier"
|
||||
|
||||
internal open fun produceExecutable() {
|
||||
private val produceExecutable: Unit by lazy {
|
||||
configureMain()
|
||||
}
|
||||
|
||||
internal fun produceExecutable() {
|
||||
produceExecutable
|
||||
}
|
||||
|
||||
internal fun configure() {
|
||||
NpmResolverPlugin.apply(project)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user