Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work around bndtools/bnd#5695 by configuring jar tasks eagerly (#3354)
Eagerly configure Jar tasks to create the BundleTaskExtension prior to the Gradle compileClasspath configuration becoming locked and triggering it's beforeLocking callback to run. This allows the BND extension to modify the LibraryElements attribute on that configuration and request a variant with the "jar" value prior to Gradle automatically modifying the attribute to request the "classes" value. This ensures jars are present on the classpath for BND to use when checked for exported classes to use when building the manifest. If it only uses the classes directory for this task, it will not have access to version information and will not write version info to the manifest it is assembling for the current project, causing the verifyOSGi task to fail. Addresses issue bndtools/bnd#5695 and allows merging of #3351.
- Loading branch information