-
-
Notifications
You must be signed in to change notification settings - Fork 304
gradle: Use an ArtifactView for jar library elements selection #5702
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
gradle: Use an ArtifactView for jar library elements selection #5702
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proposed solution does not properly handle the Bnd workspace model builds.
gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndPlugin.java
Show resolved
Hide resolved
gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BundleTaskExtension.java
Outdated
Show resolved
Hide resolved
gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndPlugin.java
Outdated
Show resolved
Hide resolved
gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndPlugin.java
Show resolved
Hide resolved
|
I am working on improvements to this PR and will soon push them. |
Slightly delayed as there were a number of issue related to updating the build to Gradle 8.1.1 which I first have to resolve. |
1cfabf5 to
9f696b1
Compare
|
I have updated this PR with the additional changes. I tested locally on 8.2-rc-2 successfully but the test case should not hard code the gradle version number. |
9f696b1 to
ae9d5aa
Compare
|
@bjhargrave reason you did not merge it? |
Just allowing some time for feedback from @tresat and/or @big-guy. I will merge it later. |
Using an ArtifactView avoids ordering issues when the Jar task is realized prior to the compileClasspath configuration being modified just before resolution. It makes the attributes used to resolve libraries more predictable, and prevents an internal behavior change in Gradle 8.2 from affecting this process. This also avoids modifying attributes on Gradle-created configurations, which should be avoided. Signed-off-by: Tom Tresansky <ttresansky@gradle.com> Signed-off-by: BJ Hargrave <bj@hargrave.dev>
ae9d5aa to
b6966d1
Compare
|
Thanks for addressing this! |
Using an ArtifactView avoids ordering issues when the Jar task is
realized prior to the compileClasspath configuration being modified
just before resolution. It makes the attributes used to resolve
libraries more predictable, and prevents an internal behavior change in
Gradle 8.2 from affecting this process.
This also avoids modifying attributes on Gradle-created configurations,
which should be avoided.