chore(frontend+infra): re-enable browser environment for Kotlin JS with NodeJs workaround
- Applied Root NodeJs plugin initialization to resolve Gradle 9/KMP race condition.
- Restored `browser {}` configuration in multiple frontend modules, with JS test tasks disabled to prevent redundant execution.
This commit is contained in:
parent
25f40567c7
commit
92cdd22f1f
|
|
@ -2,6 +2,7 @@ import groovy.json.JsonSlurper
|
|||
import io.gitlab.arturbosch.detekt.Detekt
|
||||
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import org.jlleitschuh.gradle.ktlint.KtlintExtension
|
||||
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
|
||||
|
|
@ -33,6 +34,10 @@ plugins {
|
|||
alias(libs.plugins.ktlint)
|
||||
}
|
||||
|
||||
// Workaround for Gradle 9 / KMP Race Condition:
|
||||
// Wir erzwingen die Initialisierung des NodeJsRootPlugins im Root-Projekt
|
||||
apply<NodeJsRootPlugin>()
|
||||
|
||||
// ##################################################################
|
||||
// ### ALLPROJECTS CONFIGURATION ###
|
||||
// ##################################################################
|
||||
|
|
@ -252,7 +257,8 @@ tasks.register("checkBundleBudget") {
|
|||
}
|
||||
|
||||
// Collect JS files under distributions (avoid .map and .txt)
|
||||
val jsFiles = distDir.walkTopDown().filter { it.isFile && it.extension == "js" && !it.name.endsWith(".map") }.toList()
|
||||
val jsFiles =
|
||||
distDir.walkTopDown().filter { it.isFile && it.extension == "js" && !it.name.endsWith(".map") }.toList()
|
||||
if (jsFiles.isEmpty()) {
|
||||
report.appendLine("- ${shell.path}: no JS artifacts found in ${distDir.path}")
|
||||
return@forEach
|
||||
|
|
|
|||
|
|
@ -12,7 +12,12 @@ kotlin {
|
|||
|
||||
js(IR) {
|
||||
binaries.library()
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
|
||||
|
|
|
|||
|
|
@ -15,8 +15,12 @@ kotlin {
|
|||
|
||||
js {
|
||||
binaries.library()
|
||||
// browser {} block is intentionally removed to prevent "Plugin loaded multiple times" error.
|
||||
// The warning "JS Environment Not Selected" is acceptable for now.
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,12 @@ kotlin {
|
|||
jvm()
|
||||
js(IR) {
|
||||
binaries.library()
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,12 @@ kotlin {
|
|||
jvm()
|
||||
js {
|
||||
binaries.library()
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,12 @@ kotlin {
|
|||
jvm()
|
||||
js {
|
||||
binaries.library()
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,12 @@ kotlin {
|
|||
jvm()
|
||||
js {
|
||||
binaries.library()
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,12 @@ kotlin {
|
|||
jvm()
|
||||
js {
|
||||
binaries.library()
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,12 @@ kotlin {
|
|||
jvm()
|
||||
js(IR) {
|
||||
binaries.library()
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,12 @@ kotlin {
|
|||
jvm()
|
||||
js {
|
||||
binaries.library()
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user