My Gradle plugin is successfully generating an Import-Package instruction for the Jar task, which I am setting via the builder plugin’s bnd task extension. However, I am concerned that someone may accidentally clobber my Import-Package with one of their own, which would be bad…
I have tried creating a “merged instruction” via Import-Package.foo=...., but that didn’t work. Does Bnd support doing anything like this please?
For reference, while I have been able to create a merged instruction for -includeresource, I have also failed to do so for -exportcontents.
Import-Package is not a merged instruction. And I am not sure it would be wise to make it merged. Similarly, Export-Package is also not a merged instruction. Not all instructions are merged.
The ultimate user of your plugin should be able to control the imports.