-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression with Gradle 8.2-rc-2 #5695
Comments
@tresat has written an analysis of the issue in junit-team/junit5#3351 (comment) and will submit a PR |
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.
Thanks a lot for doing this. I would really appreciate the PR. @bjhargrave time to add your thoughts? |
Bnd does need to use the jar library elements since Bnd needs the built jars in the class path to (1) access the OSGi metadata in the jar, and (2) the complete contents of the jar since Bnd can assemble a jar quite differently than the contents of the compilation output directories. |
Yes. We think the fix to BND will actually be pretty straightforward. I started work on an integration test in the BND project to demo this situation but haven't finished yet. Back to that tomorrow. |
Awesome, thank you! |
This reverts commit de0e384.
After updating the JUnit build from Gradle 8.1 to 8.2-rc-2 (see draft PR), the produced manifests no longer include version numbers for imported packages which causes our
verifyOSGi
Resolve
tasks to fail (Build Scan).Full diff:
Do you have any ideas why that would be?
The text was updated successfully, but these errors were encountered: