Closed myniva closed 7 years ago
I am not sure why you do your build script in such a strange way. It would be more straight forward to just apply the biz.aQute.bnd.builder
plugin which modifies the jar
task to build the bundle.
Can you please provide a small github repo which demonstrates the problem? Then I can investigate. Thanks.
Are you using some other OSGi plugin in your build? Like https://docs.gradle.org/3.5/userguide/osgi_plugin.html? The exception would indicate Bnd classes from different version of Bnd in the classpath.
Thank you for your quick response!
The hint about Bnd classes from a different version was helpful. The Gradle build src of my project had a transitive dependency to an old version of Bnd. I excluded that dependency which solved the issue.
We have a multi-project Gradle setup. The BND plugin is applied like this:
As soon as we add any class to the Gradle
buildSrc
, the build breaks with an exception:Build environment: