Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c37ecb952 | |||
| c25ef17a4a | |||
| e5e3b4cfec |
+12
-13
@@ -38,7 +38,7 @@ plugins {
|
|||||||
// ### ALLPROJECTS CONFIGURATION ###
|
// ### ALLPROJECTS CONFIGURATION ###
|
||||||
// ##################################################################
|
// ##################################################################
|
||||||
|
|
||||||
val isWasmEnabled = findProperty("enableWasm")?.toString()?.toBoolean() ?: false
|
val isWasmEnabled: Boolean = findProperty("enableWasm")?.toString()?.toBoolean() ?: false
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
// Zentrale Versionierung — liest version.properties (SemVer)
|
// Zentrale Versionierung — liest version.properties (SemVer)
|
||||||
@@ -47,10 +47,10 @@ val versionProps =
|
|||||||
java.util.Properties().also { props ->
|
java.util.Properties().also { props ->
|
||||||
rootProject.file("version.properties").inputStream().use { props.load(it) }
|
rootProject.file("version.properties").inputStream().use { props.load(it) }
|
||||||
}
|
}
|
||||||
val vMajor = versionProps.getProperty("VERSION_MAJOR", "1")
|
val vMajor: String = versionProps.getProperty("VERSION_MAJOR", "1")
|
||||||
val vMinor = versionProps.getProperty("VERSION_MINOR", "0")
|
val vMinor: String = versionProps.getProperty("VERSION_MINOR", "0")
|
||||||
val vPatch = versionProps.getProperty("VERSION_PATCH", "0")
|
val vPatch: String = versionProps.getProperty("VERSION_PATCH", "0")
|
||||||
val vQualifier = versionProps.getProperty("VERSION_QUALIFIER", "").trim()
|
val vQualifier: String = versionProps.getProperty("VERSION_QUALIFIER", "").trim()
|
||||||
val semVer = if (vQualifier.isBlank()) "$vMajor.$vMinor.$vPatch" else "$vMajor.$vMinor.$vPatch-$vQualifier"
|
val semVer = if (vQualifier.isBlank()) "$vMajor.$vMinor.$vPatch" else "$vMajor.$vMinor.$vPatch-$vQualifier"
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
@@ -113,7 +113,7 @@ subprojects {
|
|||||||
// (A) Source map configuration is handled via `gradle.properties` (global Kotlin/JS settings)
|
// (A) Source map configuration is handled via `gradle.properties` (global Kotlin/JS settings)
|
||||||
// to avoid compiler-flag incompatibilities across toolchains.
|
// to avoid compiler-flag incompatibilities across toolchains.
|
||||||
|
|
||||||
// (B) Conditional Wasm/JS Target handling based on `enableWasm` property
|
// (B) Conditional Wasm/JS Target handling based on the ` enableWasm ` property
|
||||||
// This significantly reduces build times during Desktop development.
|
// This significantly reduces build times during Desktop development.
|
||||||
// Flag is defined at the beginning of the script.
|
// Flag is defined at the beginning of the script.
|
||||||
|
|
||||||
@@ -176,8 +176,8 @@ subprojects {
|
|||||||
// Applies to all Exec-based tasks (covers Yarn/NPM invocations used by Kotlin JS plugin)
|
// Applies to all Exec-based tasks (covers Yarn/NPM invocations used by Kotlin JS plugin)
|
||||||
tasks.withType<Exec>().configureEach {
|
tasks.withType<Exec>().configureEach {
|
||||||
// Merge existing NODE_OPTIONS with --no-deprecation
|
// Merge existing NODE_OPTIONS with --no-deprecation
|
||||||
val current = (environment["NODE_OPTIONS"] as String?) ?: System.getenv("NODE_OPTIONS")
|
val current: String? = (environment["NODE_OPTIONS"] as String?) ?: System.getenv("NODE_OPTIONS")
|
||||||
val merged = if (current.isNullOrBlank()) "--no-deprecation" else "$current --no-deprecation"
|
val merged: String = if (current.isNullOrBlank()) "--no-deprecation" else "$current --no-deprecation"
|
||||||
environment("NODE_OPTIONS", merged)
|
environment("NODE_OPTIONS", merged)
|
||||||
// Also set the legacy switch to silence warnings entirely
|
// Also set the legacy switch to silence warnings entirely
|
||||||
environment("NODE_NO_WARNINGS", "1")
|
environment("NODE_NO_WARNINGS", "1")
|
||||||
@@ -276,7 +276,6 @@ tasks.register("checkBundleBudget") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
shells.forEach { shell ->
|
shells.forEach { shell ->
|
||||||
val key = shell.path.trimStart(':').replace(':', '/') // or use a colon form for budgets keys below
|
|
||||||
val colonKey = shell.path.trimStart(':').replace('/', ':').trim() // ensure ":a:b:c"
|
val colonKey = shell.path.trimStart(':').replace('/', ':').trim() // ensure ":a:b:c"
|
||||||
// Budgets are keyed by a Gradle path with colons but without leading colon in config for readability
|
// Budgets are keyed by a Gradle path with colons but without leading colon in config for readability
|
||||||
val budgetKeyCandidates =
|
val budgetKeyCandidates =
|
||||||
@@ -371,8 +370,8 @@ tasks.register("staticAnalysis") {
|
|||||||
|
|
||||||
// Apply Dokka (V2) automatically to Kotlin subprojects
|
// Apply Dokka (V2) automatically to Kotlin subprojects
|
||||||
subprojects {
|
subprojects {
|
||||||
plugins.withId("org.jetbrains.kotlin.jvm") { apply(plugin = "org.jetbrains.dokka") }
|
plugins.withId("org.jetbrains.kotlin.jvm") { pluginManager.apply("org.jetbrains.dokka") }
|
||||||
plugins.withId("org.jetbrains.kotlin.multiplatform") { apply(plugin = "org.jetbrains.dokka") }
|
plugins.withId("org.jetbrains.kotlin.multiplatform") { pluginManager.apply("org.jetbrains.dokka") }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Aggregate tasks to build multi-module docs in Markdown (GFM) and HTML
|
// Aggregate tasks to build multi-module docs in Markdown (GFM) and HTML
|
||||||
@@ -469,8 +468,8 @@ tasks.register("docs") {
|
|||||||
// Apply Node warning suppression on root project Exec tasks as well
|
// Apply Node warning suppression on root project Exec tasks as well
|
||||||
// Ensures aggregated Kotlin/JS tasks created at root (e.g., kotlinNpmInstall) inherit the env
|
// Ensures aggregated Kotlin/JS tasks created at root (e.g., kotlinNpmInstall) inherit the env
|
||||||
tasks.withType<Exec>().configureEach {
|
tasks.withType<Exec>().configureEach {
|
||||||
val current = (environment["NODE_OPTIONS"] as String?) ?: System.getenv("NODE_OPTIONS")
|
val current: String? = (environment["NODE_OPTIONS"] as String?) ?: System.getenv("NODE_OPTIONS")
|
||||||
val merged = if (current.isNullOrBlank()) "--no-deprecation" else "$current --no-deprecation"
|
val merged: String = if (current.isNullOrBlank()) "--no-deprecation" else "$current --no-deprecation"
|
||||||
environment("NODE_OPTIONS", merged)
|
environment("NODE_OPTIONS", merged)
|
||||||
environment("NODE_NO_WARNINGS", "1")
|
environment("NODE_NO_WARNINGS", "1")
|
||||||
// Set a Chrome binary path to avoid snap permission issues
|
// Set a Chrome binary path to avoid snap permission issues
|
||||||
|
|||||||
Reference in New Issue
Block a user