Would be great if this worked with Spring Dependency Management plugin
Our projects use the Spring Dependency Management plugin for importing maven BOM files (as the native gradle functionality doesn't actually mimic the semantics of the maven approach, specifically overriding versions: https://github.com/gradle/gradle/issues/9160) https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/
I am not gradle-smart enough to know if this is actually feasible or not, but this is unfortunately a blocker for us to fully move to the plugin.
Hello @madorb sorry for the late reply. Could you describe what doens't work exactluy?
Also, you should just stop using that plugin. The version odering changes in that plugin would already have been removed if the maintainers would have had the time according to the maintainers, and they themselves strongly advice to use the built-in mechanism instead. The plugin is just a relict from times before Gradle had the functionality built-in. I don't think any effort to support it would be worth the time.
@Vampire , I switched using Gradle's java-platform plugin but one use case I have recently could move it back to Spring Dependency plugin which is the ability to easily define exclusion.
https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/#dependency-management-configuration-dsl-exclusions
java-platform doesn't support it at the moment: https://github.com/gradle/gradle/issues/12214
You are talking about planting an apple tree vs. eating apples. The spring dependency management plugin is about consuming BOMs. The java-platform plugin and the issue you mentioned are about producing BOMs.
refreshVersions works with BoMs, just use the version placeholder (_) for the version of the bom dependency (don't forget platform or enforcedPlatform !), and don't specify the versions of dependencies whose versions should be taken from said BoM.