chore(gradle): centralize repository config in settings.gradle.kts and simplify BOM management
### Summary - Removed `repositories` blocks from individual `build.gradle.kts` files, moving configuration to `settings.gradle.kts`. - Replaced custom Spring Boot constraints in the platform BOM with the Spring Boot BOM for cleaner dependency management. - Explicitly added `webflux` dependency for Gateway to handle transitivity changes in Spring Boot 4.x.
This commit is contained in:
@@ -24,6 +24,10 @@ dependencies {
|
||||
implementation(projects.backend.infrastructure.monitoring.monitoringClient)
|
||||
|
||||
// === GATEWAY-SPEZIFISCHE ABHÄNGIGKEITEN ===
|
||||
// KORREKTUR: Explizite Deklaration von WebFlux, da es in Spring Boot 4.x
|
||||
// anscheinend nicht mehr vollständig transitiv vom Gateway-Starter eingebunden wird.
|
||||
implementation(libs.spring.boot.starter.webflux)
|
||||
|
||||
// Kern-Gateway inkl. Security, Actuator, CircuitBreaker, Discovery
|
||||
implementation(libs.bundles.gateway.core)
|
||||
// Ergänzende Observability (Logging, Jackson)
|
||||
|
||||
@@ -14,8 +14,10 @@ springBoot {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Platform BOM für zentrale Versionsverwaltung
|
||||
implementation(platform(projects.platform.platformBom))
|
||||
// ULTIMATIVER TEST: Wir umgehen unser lokales BOM und importieren das offizielle Spring Boot BOM direkt.
|
||||
// Wenn dies funktioniert, liegt der Fehler im Aufbau von `:platform:platform-bom`.
|
||||
implementation(platform(libs.spring.boot.dependencies))
|
||||
// implementation(platform(projects.platform.platformBom))
|
||||
|
||||
// Platform und Core Dependencies
|
||||
implementation(projects.platform.platformDependencies)
|
||||
|
||||
@@ -5,9 +5,8 @@ plugins {
|
||||
group = "at.mocode"
|
||||
version = "1.0.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
// The 'repositories' block was removed from here.
|
||||
// Repository configuration is now centralized in 'settings.gradle.kts'.
|
||||
|
||||
dependencies {
|
||||
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
||||
|
||||
+4
-9
@@ -40,15 +40,10 @@ allprojects {
|
||||
group = "at.mocode"
|
||||
version = "1.0.0-SNAPSHOT"
|
||||
|
||||
// Apply common repository configuration
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
maven { url = uri("https://jitpack.io") }
|
||||
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") }
|
||||
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
|
||||
maven { url = uri("https://us-central1-maven.pkg.dev/varabyte-repos/public") }
|
||||
}
|
||||
// The 'repositories' block was removed from here.
|
||||
// Repository configuration is now centralized in 'settings.gradle.kts'
|
||||
// as per modern Gradle best practices. This resolves dependency resolution
|
||||
// conflicts with platforms and Spring Boot 4+.
|
||||
}
|
||||
|
||||
subprojects {
|
||||
|
||||
@@ -22,22 +22,9 @@ dependencies {
|
||||
// `constraints` erzwingt spezifische Versionen für einzelne Bibliotheken.
|
||||
// Alle Versionen werden sicher aus `libs.versions.toml` bezogen.
|
||||
constraints {
|
||||
// --- Spring Boot Core Constraints (hart pinnen, um Leaks von M-Releases zu verhindern) ---
|
||||
api("org.springframework.boot:spring-boot:${libs.versions.springBoot.get()}")
|
||||
api("org.springframework.boot:spring-boot-autoconfigure:${libs.versions.springBoot.get()}")
|
||||
api("org.springframework.boot:spring-boot-actuator-autoconfigure:${libs.versions.springBoot.get()}")
|
||||
api("org.springframework.boot:spring-boot-actuator:${libs.versions.springBoot.get()}")
|
||||
api("org.springframework.boot:spring-boot-starter:${libs.versions.springBoot.get()}")
|
||||
api("org.springframework.boot:spring-boot-test:${libs.versions.springBoot.get()}")
|
||||
api("org.springframework.boot:spring-boot-test-autoconfigure:${libs.versions.springBoot.get()}")
|
||||
// Zusätzliche Boot-Module, die in neueren Versionen als eigenständige Artefakte vorliegen
|
||||
// und in AutoConfigurations referenziert werden. Hart pinnen, um Versions-Skew in Tests zu vermeiden.
|
||||
// HttpClient AutoConfig und Settings
|
||||
api("org.springframework.boot:spring-boot-http:${libs.versions.springBoot.get()}")
|
||||
api("org.springframework.boot:spring-boot-autoconfigure-processor:${libs.versions.springBoot.get()}")
|
||||
api("org.springframework.boot:spring-boot-http-converter:${libs.versions.springBoot.get()}")
|
||||
// Kontext- und Properties-Unterstützung, auf die PropertyMapper intern zugreifen kann
|
||||
api("org.springframework.boot:spring-boot-configuration-processor:${libs.versions.springBoot.get()}")
|
||||
// --- Spring Boot Core Constraints wurden entfernt. ---
|
||||
// Die Versionen werden jetzt vollständig durch das importierte Spring Boot BOM verwaltet.
|
||||
// Das ist der saubere und empfohlene Weg.
|
||||
|
||||
// --- Utilities & Other ---
|
||||
api(libs.caffeine)
|
||||
|
||||
@@ -21,7 +21,6 @@ plugins {
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
|
||||
Reference in New Issue
Block a user