Open juherr opened 2 years ago
Seeing a similar issue with resolutionStrategy.force(...)
being replaced with an underscore, but then refreshVersions
doesn't fill it in with the appropriate version.
Same issue with Spring.boms.springclmoud (no matter if expanded or using the provided constant). Is there a know workaround? Encountered this by migrating to Spring Boot 3.0.2 (Beside providing the version inside build.kts of course)
I spent some time today, as this was the only version not present in the versions.properties due to the bug.
I found a workaround to manually load a version from the versions.properties file with the simple ability to inject anywhere in the gradle.kts files. refreshVersions will still not pick it up of course automatically but at least from a definition point of view its now consistent.
Its not the most beautiful thing but at least works:
val props = Properties().apply {
load(FileInputStream(File(rootProject.rootDir, "versions.properties")))
}
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:${props.getProperty("version.org.springframework.cloud..spring-cloud-dependencies")}")
}
}
@LouisCAD Is there a chance there will be support for BOM versions? We are using the approach suggested by @Flowkap above, but the versions for the BOMs aren't being updated by the plugin this way, so one still has to manually check if there are updates for the BOMs... Maybe there is a better way to use both BOMs and refreshVersions plugin? Thanks!
Hello, the way to go is:
dependencies {
implementation(platform("whatever:the.bom:_"))
implementation("whatever:something")
}
🐛 Describe the bug
Spring boot project doesn't compile after refreshVersions migration task.
⚠️ Current behavior
✅ Expected behavior
💣 Steps to reproduce
Using https://start.spring.io/ using the following configuration:
And remplacing
By
Run:
./gradlew refreshVersionsMigrate
will updateThen
./gradlew bootRun
will fail.📱 Tech info