Hi there,
I’m writing a custom binary gradle plugin where the plugin code itself uses gradles build-in BOM support (Gradle 5.0). The plugin works when publishing and using it from a local maven repo but not when using it in a composite build.
I’ve created a small sample to show the problem. There’s a gradle plugin and a consumer which uses the plugin. There is no java code in the sample to keep it simple, but let’s suppose that the plugin needs spring boot and therefore declares a dependency for spring-boot-starter
. Running gradle build
with Gradle 5.0 from within the consumer
folder results in:
A problem occurred configuring root project 'consumer'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find org.springframework.boot:spring-boot-starter:.
Required by:
project : > project :my-plugin
So the problem is that the library version is not resolved from the BOM and therefore the library can’t be resolved. Everything works as expected when explicitly setting the version instead of using BOM. This could be a workaround, but I would like to know if this is expected to work with BOM too and maybe I’m simply doing something wrong.
Thanks for any hints on this topic.