build: remove browser configuration from core modules to fix JS plugin conflict
Eliminated `browser {}` blocks from core library modules to resolve "Plugin loaded multiple times" error in Kotlin/JS Gradle builds. Adjusted to support a cleaner, centralized JS target configuration. Documented the root cause and workaround in troubleshooting logs.
This commit is contained in:
@@ -14,15 +14,9 @@ kotlin {
|
||||
jvm()
|
||||
|
||||
js {
|
||||
// browser {} block removed to avoid NodeJsRootPlugin conflicts in multi-module builds
|
||||
// We only need explicit browser configuration in the shell (application) module.
|
||||
// Tests are disabled via root build.gradle.kts configuration anyway.
|
||||
nodejs {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
binaries.library()
|
||||
// browser {} block is intentionally removed to prevent "Plugin loaded multiple times" error.
|
||||
// The warning "JS Environment Not Selected" is acceptable for now.
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -6,15 +6,10 @@ plugins {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
||||
jvm()
|
||||
|
||||
js(IR) {
|
||||
binaries.library()
|
||||
// Explicitly select browser environment to satisfy Kotlin/JS compiler warning
|
||||
browser {
|
||||
testTask { enabled = false }
|
||||
}
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -12,9 +12,7 @@ kotlin {
|
||||
jvm()
|
||||
js {
|
||||
binaries.library()
|
||||
browser {
|
||||
testTask { enabled = false }
|
||||
}
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -12,9 +12,7 @@ kotlin {
|
||||
jvm()
|
||||
js {
|
||||
binaries.library()
|
||||
browser {
|
||||
testTask { enabled = false }
|
||||
}
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -13,9 +13,7 @@ kotlin {
|
||||
jvm()
|
||||
js {
|
||||
binaries.library()
|
||||
browser {
|
||||
testTask { enabled = false }
|
||||
}
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -12,9 +12,7 @@ kotlin {
|
||||
jvm()
|
||||
js {
|
||||
binaries.library()
|
||||
browser {
|
||||
testTask { enabled = false }
|
||||
}
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -7,16 +7,14 @@ kotlin {
|
||||
jvm()
|
||||
js(IR) {
|
||||
binaries.library()
|
||||
browser {
|
||||
testTask { enabled = false }
|
||||
}
|
||||
// browser {} block removed to fix "Plugin loaded multiple times" error.
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain.dependencies {
|
||||
// Correct dependency: Syncable interface is in the shared core domain
|
||||
// Correct dependency: Syncable interface is in shared core domain
|
||||
implementation(projects.core.coreDomain)
|
||||
// Also include frontend domain if needed (e.g., for frontend-specific models)
|
||||
// Also include frontend domain if needed (e.g. for frontend specific models)
|
||||
implementation(projects.frontend.core.domain)
|
||||
|
||||
// Networking
|
||||
|
||||
Reference in New Issue
Block a user