[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(
|
val appProject = transformProjectWithPluginsDsl(
|
||||||
projectName = "app",
|
projectName = "app",
|
||||||
directoryPrefix = rootProjectName,
|
directoryPrefix = rootProjectName,
|
||||||
wrapperVersion = GradleVersionRequired.AtLeast("5.3")
|
wrapperVersion = GradleVersionRequired.AtLeast("5.5")
|
||||||
)
|
)
|
||||||
|
|
||||||
val libProject = transformProjectWithPluginsDsl(
|
val libProject = transformProjectWithPluginsDsl(
|
||||||
projectName = "lib",
|
projectName = "lib",
|
||||||
directoryPrefix = rootProjectName,
|
directoryPrefix = rootProjectName,
|
||||||
wrapperVersion = GradleVersionRequired.AtLeast("5.3")
|
wrapperVersion = GradleVersionRequired.AtLeast("5.5")
|
||||||
)
|
)
|
||||||
|
|
||||||
libProject.gradleProperties().appendText(jsCompilerType(KotlinJsCompilerType.IR))
|
libProject.gradleProperties().appendText(jsCompilerType(KotlinJsCompilerType.IR))
|
||||||
|
|||||||
+11
-4
@@ -8,10 +8,17 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin.js {
|
kotlin {
|
||||||
binaries.executable()
|
js {
|
||||||
nodejs()
|
nodejs()
|
||||||
browser()
|
binaries.executable()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
kotlin {
|
||||||
|
js {
|
||||||
|
browser()
|
||||||
|
binaries.executable()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("browserTest") {
|
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()
|
configureMain()
|
||||||
return@lazy { Unit }
|
}
|
||||||
|
|
||||||
|
internal fun produceExecutable() {
|
||||||
|
produceExecutable
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun testTask(body: KotlinJsTest.() -> Unit) {
|
override fun testTask(body: KotlinJsTest.() -> Unit) {
|
||||||
|
|||||||
+5
-1
@@ -42,10 +42,14 @@ abstract class KotlinJsSubTarget(
|
|||||||
|
|
||||||
protected val taskGroupName = "Kotlin $disambiguationClassifier"
|
protected val taskGroupName = "Kotlin $disambiguationClassifier"
|
||||||
|
|
||||||
internal open fun produceExecutable() {
|
private val produceExecutable: Unit by lazy {
|
||||||
configureMain()
|
configureMain()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal fun produceExecutable() {
|
||||||
|
produceExecutable
|
||||||
|
}
|
||||||
|
|
||||||
internal fun configure() {
|
internal fun configure() {
|
||||||
NpmResolverPlugin.apply(project)
|
NpmResolverPlugin.apply(project)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user