Skip to content

Conversation

@tresat
Copy link
Contributor

@tresat tresat commented Jun 20, 2023

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.

Copy link
Member

@bjhargrave bjhargrave left a 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.

@bjhargrave
Copy link
Member

I am working on improvements to this PR and will soon push them.

@bjhargrave
Copy link
Member

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.

@bjhargrave bjhargrave force-pushed the remove-jar-library-elements-method branch from 1cfabf5 to 9f696b1 Compare June 28, 2023 23:17
@bjhargrave bjhargrave changed the title Remove unnecessary methods gradle: Use an ArtifactView for jar library elements selection Jun 28, 2023
@bjhargrave
Copy link
Member

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.

@bjhargrave bjhargrave force-pushed the remove-jar-library-elements-method branch from 9f696b1 to ae9d5aa Compare June 29, 2023 00:26
@pkriens
Copy link
Member

pkriens commented Jun 29, 2023

@bjhargrave reason you did not merge it?

@bjhargrave
Copy link
Member

@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>
@bjhargrave bjhargrave force-pushed the remove-jar-library-elements-method branch from ae9d5aa to b6966d1 Compare June 29, 2023 12:45
@bjhargrave bjhargrave linked an issue Jun 30, 2023 that may be closed by this pull request
@bjhargrave bjhargrave merged commit 2137a36 into bndtools:master Jun 30, 2023
@tresat
Copy link
Contributor Author

tresat commented Jun 30, 2023

Thanks for addressing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression with Gradle 8.2-rc-2

4 participants