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)
|
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
|
||||||
|
// anscheinend nicht mehr vollständig transitiv vom Gateway-Starter eingebunden wird.
|
||||||
|
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)
|
||||||
|
|||||||
@@ -14,8 +14,10 @@ springBoot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Platform BOM für zentrale Versionsverwaltung
|
// ULTIMATIVER TEST: Wir umgehen unser lokales BOM und importieren das offizielle Spring Boot BOM direkt.
|
||||||
implementation(platform(projects.platform.platformBom))
|
// 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
|
// Platform und Core Dependencies
|
||||||
implementation(projects.platform.platformDependencies)
|
implementation(projects.platform.platformDependencies)
|
||||||
|
|||||||
@@ -5,9 +5,8 @@ plugins {
|
|||||||
group = "at.mocode"
|
group = "at.mocode"
|
||||||
version = "1.0.0-SNAPSHOT"
|
version = "1.0.0-SNAPSHOT"
|
||||||
|
|
||||||
repositories {
|
// The 'repositories' block was removed from here.
|
||||||
mavenCentral()
|
// Repository configuration is now centralized in 'settings.gradle.kts'.
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
||||||
|
|||||||
+4
-9
@@ -40,15 +40,10 @@ allprojects {
|
|||||||
group = "at.mocode"
|
group = "at.mocode"
|
||||||
version = "1.0.0-SNAPSHOT"
|
version = "1.0.0-SNAPSHOT"
|
||||||
|
|
||||||
// Apply common repository configuration
|
// The 'repositories' block was removed from here.
|
||||||
repositories {
|
// Repository configuration is now centralized in 'settings.gradle.kts'
|
||||||
mavenCentral()
|
// as per modern Gradle best practices. This resolves dependency resolution
|
||||||
google()
|
// conflicts with platforms and Spring Boot 4+.
|
||||||
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") }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
|
|||||||
@@ -22,22 +22,9 @@ dependencies {
|
|||||||
// `constraints` erzwingt spezifische Versionen für einzelne Bibliotheken.
|
// `constraints` erzwingt spezifische Versionen für einzelne Bibliotheken.
|
||||||
// Alle Versionen werden sicher aus `libs.versions.toml` bezogen.
|
// Alle Versionen werden sicher aus `libs.versions.toml` bezogen.
|
||||||
constraints {
|
constraints {
|
||||||
// --- Spring Boot Core Constraints (hart pinnen, um Leaks von M-Releases zu verhindern) ---
|
// --- Spring Boot Core Constraints wurden entfernt. ---
|
||||||
api("org.springframework.boot:spring-boot:${libs.versions.springBoot.get()}")
|
// Die Versionen werden jetzt vollständig durch das importierte Spring Boot BOM verwaltet.
|
||||||
api("org.springframework.boot:spring-boot-autoconfigure:${libs.versions.springBoot.get()}")
|
// Das ist der saubere und empfohlene Weg.
|
||||||
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()}")
|
|
||||||
|
|
||||||
// --- Utilities & Other ---
|
// --- Utilities & Other ---
|
||||||
api(libs.caffeine)
|
api(libs.caffeine)
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
google()
|
google()
|
||||||
|
|||||||
Reference in New Issue
Block a user