-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Upgradle to 8.2-rc-2 #3351
Upgradle to 8.2-rc-2 #3351
Conversation
Blocked by bndtools/bnd#5695 |
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 issue #5695 and allows merging of junit-team/junit5 pr junit-team#3351.
Hi Marc, after debugging yesterday, Sterling and I determined that this failure is caused by a change in what was thought was merely an internal behavior in Gradle 8.2. However, BND is unfortunately relying on the old behavior. I'm going to submit a PR to BND next containing a proper fix for them. The PR here will workaround this issue and should work with Gradle 8.1.x as well as >= 8.2-rc-2. It will eagerly configure the What's meant to be happening is this:
What's happening now after the change: A change in Gradle 8.2 to Due to the now lazier behavior when building the root metadata, This is meaningful because by default, Gradle would substitute the secondary When the Summary Whether BND works or not ultimately comes down to whether This is clearly not a requirement a build author should be thinking about, especially as the the order that configurations are iterated in Hopefully this makes sense and this fix works for now, until BND can be also be fixed. |
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.
87021cd
to
4144031
Compare
No description provided.