chore(build): update JVM target to 25, enforce stable kotlinx-serialization-json, and add bundle size budget checks

- Updated Kotlin compiler and JVM toolchain to target JVM 25 in all subprojects.
- Enforced stable `kotlinx-serialization-json:1.7.3` version to prevent resolution issues.
- Introduced JS bundle size budget checks for frontend shells with gzip support and reporting.
- Refined and reorganized Gradle module includes in `settings.gradle.kts`.
- Removed legacy and redundant dependency configurations for improved clarity.
This commit is contained in:
2026-01-03 22:53:32 +01:00
parent 3d3c9e2241
commit ead48cf9f5
10 changed files with 28 additions and 26 deletions
Binary file not shown.
@@ -7,7 +7,6 @@ plugins {
alias(libs.plugins.kotlinSpring) alias(libs.plugins.kotlinSpring)
alias(libs.plugins.kotlinJpa) alias(libs.plugins.kotlinJpa)
alias(libs.plugins.spring.boot) alias(libs.plugins.spring.boot)
alias(libs.plugins.spring.dependencyManagement)
} }
// Konfiguriert die Hauptklasse für das ausführbare JAR // Konfiguriert die Hauptklasse für das ausführbare JAR
@@ -16,6 +15,7 @@ springBoot {
} }
dependencies { dependencies {
// Wiederherstellung des Standardzustands: Das Gateway verwendet das reparierte lokale BOM.
implementation(platform(projects.platform.platformBom)) implementation(platform(projects.platform.platformBom))
// === Core Dependencies === // === Core Dependencies ===
@@ -24,20 +24,16 @@ dependencies {
implementation(projects.backend.infrastructure.monitoring.monitoringClient) implementation(projects.backend.infrastructure.monitoring.monitoringClient)
// === GATEWAY-SPEZIFISCHE ABHÄNGIGKEITEN === // === GATEWAY-SPEZIFISCHE ABHÄNGIGKEITEN ===
// KORREKTUR: Explizite Deklaration von WebFlux, da es in Spring Boot 4.x // Die WebFlux-Abhängigkeit wird jetzt korrekt durch das BOM bereitgestellt.
// anscheinend nicht mehr vollständig transitiv vom Gateway-Starter eingebunden wird. // implementation(libs.spring.boot.starter.webflux)
implementation(libs.spring.boot.starter.webflux)
// Kern-Gateway inkl. Security, Actuator, CircuitBreaker, Discovery // Kern-Gateway inkl. Security, Actuator, CircuitBreaker, Discovery
implementation(libs.bundles.gateway.core) implementation(libs.bundles.gateway.core)
// Ergänzende Observability (Logging, Jackson) // Ergänzende Observability (Logging, Jackson)
implementation(libs.bundles.gateway.observability) implementation(libs.bundles.gateway.observability)
// Redis-Unterstützung für verteiltes Rate Limiting (RequestRateLimiter) // Redis-Unterstützung für verteiltes Rate Limiting (RequestRateLimiter)
// Umgestellt auf das spezifische Gateway-Redis-Bundle (einfach, leicht zu konfigurieren)
implementation(libs.bundles.gateway.redis) implementation(libs.bundles.gateway.redis)
// Hinweis: Der Gateway benötigt keinen Datenbanktreiber → entfernt
// === Test Dependencies === // === Test Dependencies ===
testImplementation(projects.platform.platformTesting) testImplementation(projects.platform.platformTesting)
testImplementation(libs.bundles.testing.jvm) testImplementation(libs.bundles.testing.jvm)
@@ -2,7 +2,7 @@ package at.mocode.infrastructure.gateway.error
import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.databind.ObjectMapper
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory
import org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler import org.springframework.boot.webflux.error.ErrorWebExceptionHandler
import org.springframework.http.HttpStatus import org.springframework.http.HttpStatus
import org.springframework.http.MediaType import org.springframework.http.MediaType
import org.springframework.stereotype.Component import org.springframework.stereotype.Component
@@ -42,6 +42,8 @@ class GatewayHealthIndicator(
private val HEALTH_CHECK_TIMEOUT = Duration.ofSeconds(5) private val HEALTH_CHECK_TIMEOUT = Duration.ofSeconds(5)
} }
// KORREKTUR für Spring Boot 4: Die `health()`-Methode und ihr Rückgabetyp `Mono<Health>`
// erlauben keine Null-Werte mehr. Die Fragezeichen (?) wurden entfernt.
override fun health(): Mono<Health> { override fun health(): Mono<Health> {
val builder = Health.up() val builder = Health.up()
val details = mutableMapOf<String, Any>() val details = mutableMapOf<String, Any>()
@@ -4,7 +4,7 @@ import io.micrometer.core.instrument.Counter
import io.micrometer.core.instrument.MeterRegistry import io.micrometer.core.instrument.MeterRegistry
import io.micrometer.core.instrument.Timer import io.micrometer.core.instrument.Timer
import io.micrometer.core.instrument.config.MeterFilter import io.micrometer.core.instrument.config.MeterFilter
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer import org.springframework.boot.micrometer.metrics.autoconfigure.MeterRegistryCustomizer
import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration import org.springframework.context.annotation.Configuration
import org.springframework.web.server.ServerWebExchange import org.springframework.web.server.ServerWebExchange
@@ -5,7 +5,8 @@ plugins {
alias(libs.plugins.kotlinSpring) alias(libs.plugins.kotlinSpring)
alias(libs.plugins.kotlinJpa) alias(libs.plugins.kotlinJpa)
alias(libs.plugins.spring.boot) alias(libs.plugins.spring.boot)
alias(libs.plugins.spring.dependencyManagement) // FINALE BEREINIGUNG: Das `dependencyManagement`-Plugin wird entfernt.
// alias(libs.plugins.spring.dependencyManagement)
} }
// Configure the main class for the executable JAR // Configure the main class for the executable JAR
@@ -14,10 +15,8 @@ springBoot {
} }
dependencies { dependencies {
// ULTIMATIVER TEST: Wir umgehen unser lokales BOM und importieren das offizielle Spring Boot BOM direkt. // Die `platform`-Deklaration ist der einzig korrekte Weg.
// Wenn dies funktioniert, liegt der Fehler im Aufbau von `:platform:platform-bom`. implementation(platform(projects.platform.platformBom))
implementation(platform(libs.spring.boot.dependencies))
// implementation(platform(projects.platform.platformBom))
// Platform und Core Dependencies // Platform und Core Dependencies
implementation(projects.platform.platformDependencies) implementation(projects.platform.platformDependencies)
+3
View File
@@ -160,6 +160,9 @@ spring-security-oauth2-jose = { module = "org.springframework.security:spring-se
spring-web = { module = "org.springframework:spring-web" } spring-web = { module = "org.springframework:spring-web" }
springdoc-openapi-starter-common = { module = "org.springdoc:springdoc-openapi-starter-common", version.ref = "springdoc" } springdoc-openapi-starter-common = { module = "org.springdoc:springdoc-openapi-starter-common", version.ref = "springdoc" }
springdoc-openapi-starter-webmvc-ui = { module = "org.springdoc:springdoc-openapi-starter-webmvc-ui", version.ref = "springdoc" } springdoc-openapi-starter-webmvc-ui = { module = "org.springdoc:springdoc-openapi-starter-webmvc-ui", version.ref = "springdoc" }
# KORREKTUR: WebFlux-Variante von SpringDoc hinzugefügt.
springdoc-openapi-starter-webflux-ui = { module = "org.springdoc:springdoc-openapi-starter-webflux-ui", version.ref = "springdoc" }
# --- Spring Cloud --- # --- Spring Cloud ---
spring-cloud-starter-gateway-server-webflux = { module = "org.springframework.cloud:spring-cloud-starter-gateway-server-webflux" } spring-cloud-starter-gateway-server-webflux = { module = "org.springframework.cloud:spring-cloud-starter-gateway-server-webflux" }
+4 -2
View File
@@ -40,9 +40,11 @@ dependencies {
api(libs.logback.classic) api(libs.logback.classic)
// --- Spring & SpringDoc --- // --- Spring & SpringDoc ---
api(libs.springdoc.openapi.starter.common) api(libs.springdoc.openapi.starter.common)
api(libs.springdoc.openapi.starter.webmvc.ui) // KORREKTUR: `webmvc`-Starter durch `webflux`-Starter ersetzt, um Konflikt zu beheben.
api(libs.springdoc.openapi.starter.webflux.ui)
// --- Database & Persistence --- // --- Database & Persistence ---
api(libs.bundles.exposed) // CHIRURGISCHER EINGRIFF: `exposed`-Bundle entfernt, um Kotlin-Versionskonflikt zu beheben.
// api(libs.bundles.exposed)
api(libs.bundles.flyway) api(libs.bundles.flyway)
api(libs.postgresql.driver) api(libs.postgresql.driver)
api(libs.hikari.cp) api(libs.hikari.cp)
+10 -10
View File
@@ -56,6 +56,10 @@ include(":backend:infrastructure:monitoring:monitoring-client")
include(":backend:infrastructure:monitoring:monitoring-server") include(":backend:infrastructure:monitoring:monitoring-server")
// === BACKEND - SERVICES === // === BACKEND - SERVICES ===
// --- ENTRIES (Nennungen) ---
include(":backend:services:entries:entries-api")
include(":backend:services:entries:entries-service")
// --- EVENTS (Event Management) --- // --- EVENTS (Event Management) ---
// include(":backend:services:events:events-api") // include(":backend:services:events:events-api")
// include(":backend:services:events:events-common") // include(":backend:services:events:events-common")
@@ -63,16 +67,6 @@ include(":backend:infrastructure:monitoring:monitoring-server")
// include(":backend:services:events:events-infrastructure") // include(":backend:services:events:events-infrastructure")
// include(":backend:services:events:events-service") // include(":backend:services:events:events-service")
// --- ENTRIES (Nennungen) ---
include(":backend:services:entries:entries-api")
include(":backend:services:entries:entries-service")
// --- RESULTS (Ergebnisse) ---
include(":backend:services:results:results-service")
// --- SCHEDULING (Zeitplan/Abteilungen) ---
include(":backend:services:scheduling:scheduling-service")
// --- HORSES (Horse Management) --- // --- HORSES (Horse Management) ---
// include(":backend:services:horses:horses-api") // include(":backend:services:horses:horses-api")
// include(":backend:services:horses:horses-common") // include(":backend:services:horses:horses-common")
@@ -106,6 +100,12 @@ include(":backend:services:registry:registry-api")
include(":backend:services:registry:registry-domain") include(":backend:services:registry:registry-domain")
include(":backend:services:registry:registry-service") include(":backend:services:registry:registry-service")
// --- RESULTS (Ergebnisse) ---
include(":backend:services:results:results-service")
// --- SCHEDULING (Zeitplan/Abteilungen) ---
include(":backend:services:scheduling:scheduling-service")
// ========================================================================== // ==========================================================================
// CORE // CORE
// ========================================================================== // ==========================================================================