I love the new BOM support in Gradle 5, but there’s one issue I’m having while attempting to create a bill of materials with the java-platform plugin. I can successfully create a BOM for dependencies, but I’m unable to include another BOM with the import scope. I have created a sample project at https://github.com/budjb/gradle-import-test to demonstrate what happens. I’d expect that the POM includes the dependency with the “import” scope, but it’s including it with the “compile” scope.
Does the plugin support this and I just need to change my code, or is this a missing feature? I wanted to ask before I submitted an issue on GitHub.
I did figure it out! You need to allow dependencies as the documentation describes, and include the platform dependency outside of the constraints block. Build the bom and inspect it after that change, and it looks as expected.