meldestelle/frontend/core/auth/build.gradle.kts
Stefan Mogeritsch c613acb91d build: initialize JS target in root to fix isolated classpath issue
Explicitly added JS target with browser and Node.js configurations at the root level to ensure the NodeJsRootPlugin is loaded. Resolved the "IsolatedKotlinClasspathClassCastException" error in subprojects. Updated Yarn lock to reflect new dependencies.
2026-02-03 15:02:26 +01:00

83 lines
2.2 KiB
Plaintext

import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
id("org.jetbrains.kotlin.multiplatform")
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
alias(libs.plugins.kotlinSerialization)
}
group = "at.mocode.frontend.core"
version = "1.0.0"
kotlin {
jvm()
js {
binaries.library()
// CHANGED: Use nodejs() instead of browser() to minimize NodeJsRootPlugin conflicts in Docker
// while still satisfying the "configured for JS usage" requirement.
nodejs()
}
sourceSets {
commonMain.dependencies {
// UI Kit (Design System)
implementation(projects.frontend.core.designSystem)
// Network core (provides apiClient + TokenProvider interface)
implementation(projects.frontend.core.network)
// Domain core (provides AppConstants)
implementation(projects.frontend.core.domain)
// Compose dependencies
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material3)
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.materialIconsExtended)
// Bundles
implementation(libs.bundles.kmp.common)
implementation(libs.bundles.ktor.client.common)
implementation(libs.bundles.compose.common)
// DI
implementation(libs.koin.core)
}
commonTest.dependencies {
implementation(libs.kotlin.test)
implementation(libs.kotlinx.coroutines.test)
implementation(libs.ktor.client.mock)
}
jvmTest.dependencies {
implementation(libs.mockk)
implementation(projects.platform.platformTesting)
implementation(libs.bundles.testing.jvm)
}
jvmMain.dependencies {
implementation(libs.ktor.client.cio)
}
jsMain.dependencies {
implementation(libs.ktor.client.js)
}
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_25)
freeCompilerArgs.addAll(
"-opt-in=kotlin.RequiresOptIn",
"-Xexpect-actual-classes"
)
}
}