upgrade build: Kotlin-JVM Toolchain auf 25 gesetzt, JVM Target korrigiert & Gitignore erweitert

This commit is contained in:
Stefan Mogeritsch 2026-01-03 12:51:43 +01:00
parent 097721aca3
commit e8f458d4c5
2 changed files with 76 additions and 22 deletions

70
.gitignore vendored
View File

@ -1,42 +1,72 @@
# General build artifacts # --- General ---
build/
out/
.gradle/ .gradle/
**/build/ **/build/
**/out/
# Enviroments
#.env
# Kotlin
.kotlin/ .kotlin/
kotlin-js-store/
# IDE # --- Environments ---
#.env
config/env/.env.local
.env.development.local
.env.test.local
.env.production.local
.env.local
# --- IDEs ---
# IntelliJ
.idea/ .idea/
*.iml *.iml
*.ipr
*.iws
# Node # VS Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/snippets
# Fleet
.fleet/
!.fleet/receipt.json
# --- Dependencies & Build ---
node_modules/ node_modules/
**/node_modules/ **/node_modules/
package-lock.json
yarn.lock
pnpm-lock.yaml
# OS files # --- OS Files ---
.DS_Store .DS_Store
Thumbs.db Thumbs.db
*.swp
*~
.nfs*
# Logs # --- Logs ---
_backup/logs/ _backup/logs/
**/*.log **/*.log
*.log.gz
# Kotlin/Java # --- Languages & Runtimes ---
# Java/Kotlin
*.class *.class
.attach_pid*
# Generated diagrams # Python
build/diagrams/
# Local runtime secrets/overrides
config/env/.env.local
# Python virtual environment
.venv/ .venv/
venv/ venv/
ENV/
*.pyc *.pyc
__pycache__/ __pycache__/
# --- Quality & Documentation ---
build/diagrams/
.eslintcache
.stylelintcache
.phpunit.result.cache
.dataSources/
dataSources.local.xml

View File

@ -79,6 +79,18 @@ subprojects {
// Ensure a full JDK toolchain with compiler is available (Gradle will auto-download if missing) // Ensure a full JDK toolchain with compiler is available (Gradle will auto-download if missing)
javaExt.toolchain.languageVersion.set(JavaLanguageVersion.of(25)) javaExt.toolchain.languageVersion.set(JavaLanguageVersion.of(25))
// Set Kotlin Toolchain for projects using Kotlin
plugins.withId("org.jetbrains.kotlin.jvm") {
extensions.configure<org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension> {
jvmToolchain(25)
}
}
plugins.withId("org.jetbrains.kotlin.multiplatform") {
extensions.configure<org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension> {
jvmToolchain(25)
}
}
tasks.register<Test>("perfTest") { tasks.register<Test>("perfTest") {
description = "Runs tests tagged with 'perf'" description = "Runs tests tagged with 'perf'"
group = "verification" group = "verification"
@ -111,9 +123,20 @@ subprojects {
environment("PUPPETEER_EXECUTABLE_PATH", "/usr/bin/chromium") environment("PUPPETEER_EXECUTABLE_PATH", "/usr/bin/chromium")
} }
tasks.withType<KotlinCompile> { // Suche diesen Block am Ende von subprojects und ersetze ihn:
tasks.withType<KotlinCompile>().configureEach {
compilerOptions { compilerOptions {
// Dein bestehender Argument-Eintrag
freeCompilerArgs.add("-Xannotation-default-target=param-property") freeCompilerArgs.add("-Xannotation-default-target=param-property")
// WICHTIG: Parameter-Namen für Spring Boot & Reflection erhalten
javaParameters.set(true)
// OPTIONAL: Ermöglicht die Nutzung von Context Receivers (hilfreich in modernen Architekturen)
freeCompilerArgs.add("-Xcontext-receivers")
// Explizite Setzung des JVM Targets auf 25 (überschreibt IDE-Fehleinstellungen)
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_25)
} }
} }
@ -325,7 +348,8 @@ tasks.register("checkBundleBudget") {
} }
// Collect JS files under distributions (avoid .map and .txt) // 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()) { if (jsFiles.isEmpty()) {
report.appendLine("- ${shell.path}: no JS artifacts found in ${distDir.path}") report.appendLine("- ${shell.path}: no JS artifacts found in ${distDir.path}")
return@forEach return@forEach