meldestelle/frontend/core/auth/build.gradle.kts
Stefan Mogeritsch 11c597f147 feat: add runtime configuration for Caddy-based SPA containerization
Introduced `config.json` runtime configuration fetch mechanism to support the "Build Once, Deploy Everywhere" pattern. Replaced NGINX with Caddy for SPA deployment, enabling SPA routing, security headers, and static asset management. Updated Gradle and Kotlin/JS build configurations to align with the new runtime environment. Enhanced Dockerfile and health checks for optimized CI/CD workflows and improved SPA delivery.
2026-02-02 16:19:20 +01:00

87 lines
2.2 KiB
Plaintext

import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
alias(libs.plugins.kotlinSerialization)
}
group = "at.mocode.frontend.core"
version = "1.0.0"
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()
}
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"
)
}
}