Skip to content

feat!: Upgrade Gradle to 8.14.3, JDK 17#349

Merged
bdellegrazie merged 1 commit into
masterfrom
test/build
Oct 30, 2025
Merged

feat!: Upgrade Gradle to 8.14.3, JDK 17#349
bdellegrazie merged 1 commit into
masterfrom
test/build

Conversation

@bdellegrazie
Copy link
Copy Markdown
Collaborator

@bdellegrazie bdellegrazie commented Oct 30, 2025

Breaking Change! Upgrade to JDK 17

  • Upgrade Gradle from 8.5 -> 8.14.3
  • Tidy Gradle syntax:
    • Move all dependency definitions to versions catalog (libs.versions.toml)
    • Use newer syntax for JDK release version
    • Upgrade dependencies to latest
    • use BOMs for dependencies where appropriate
  • Use v2 Gradle plugin publication plugin
    • adds Gradle Plugin Development Plugin by default
    • adds TestKit dependency by default
    • adds dependency on Gradle API by default
  • Filter Gradle tests based on Java version

@bdellegrazie bdellegrazie requested a review from jk1 October 30, 2025 09:02
@bdellegrazie bdellegrazie force-pushed the test/build branch 2 times, most recently from fe196e8 to 2e587a0 Compare October 30, 2025 09:09
@bdellegrazie bdellegrazie changed the title fix(build): Upgrade Gradle to 8.14.3 feat!: Upgrade Gradle to 8.14.3, JDK 17 Oct 30, 2025
@bdellegrazie bdellegrazie force-pushed the test/build branch 2 times, most recently from 74155b8 to e8b49fa Compare October 30, 2025 10:17
Comment thread src/test/groovy/com/github/jk1/license/ReportTaskCachingSpec.groovy Outdated
* Breaking change - switch to JDK 17
* Upgrade Gradle from 8.5 -> 8.14.3
* Tidy Gradle syntax:
  * Move all dependency definitions to versions catalog (libs.versions.toml)
  * Use newer syntax for JDK release version
  * Upgrade dependencies to latest
  * use BOMs for dependencies where appropriate
* Use v2 Gradle plugin publication plugin
  * adds Gradle Plugin Development Plugin by default
  * adds TestKit dependency by default
  * adds dependency on Gradle API by default
* Filter Gradle tests based on Java version
@bdellegrazie bdellegrazie merged commit e8666a4 into master Oct 30, 2025
1 check passed
@bdellegrazie bdellegrazie deleted the test/build branch October 30, 2025 11:51
@chadlwilson
Copy link
Copy Markdown
Collaborator

Just wondering, is this actually a breaking change? We’re still targeting JDK 8, the tests are basically the same, and the API is the same? What am I missing? Is there something implicitly different about the target Gradle api version?

@bdellegrazie
Copy link
Copy Markdown
Collaborator Author

@chadlwilson we're breaking the compatibility with Gradle 6 - only supporting 7, 8 and 9. Might not mean much but it is a breaking change.

@chadlwilson
Copy link
Copy Markdown
Collaborator

Which specific change here actually broke that compatibility though?

Yes, we can't test against it using Java 17, but that doesn't necessarily mean we broke compatibility if it's otherwise API and Java release compliant. It seems to me the earlier plugin code was already in a dubious state it compiling against a newer Gradle ApI anyway?

Dropping support is different to breaking, and the language is important to users.

@bdellegrazie
Copy link
Copy Markdown
Collaborator Author

Which specific change here actually broke that compatibility though?

Yes, we can't test against it using Java 17, but that doesn't necessarily mean we broke compatibility if it's otherwise API and Java release compliant. It seems to me the earlier plugin code was already in a dubious state it compiling against a newer Gradle ApI anyway?

Dropping support is different to breaking, and the language is important to users.

Noted for future reference, if it's critical we can adjust the release version via a commit on master

@chadlwilson
Copy link
Copy Markdown
Collaborator

Ok, so my understanding is correct that it's mainly a "we wont guarantee Gradle 6 works for 3.x series"?

If so, still agree with the change. Just curious as to the nature of it for my future PRs 😅

@bdellegrazie
Copy link
Copy Markdown
Collaborator Author

we wont guarantee Gradle 6 works for 3.x series

Yes. The only way to do that would be to run separate tests using JDK 11, definitely possible but not something I think any of us has time for.

@chadlwilson
Copy link
Copy Markdown
Collaborator

chadlwilson commented Oct 31, 2025

Yeah agreed. Honestly I think earlier the Gradle 6 compat wasn’t working anyway, since the Gradle api version it was compiling against was 2 major versions later. Even the readme says to use 1.x for Gradle 6 https://github.com/jk1/Gradle-License-Report?tab=readme-ov-file#usage and if I remember correctly from back then the 2.x version dropped 6.x compat when adding 7.x and 8.x compat hence this change:

c6d1510

So arguably don’t/didn’t need to bump major version.

@chadlwilson
Copy link
Copy Markdown
Collaborator

Want to “never let a good crisis go to waste” and drop 7.x too? 😉

@bdellegrazie
Copy link
Copy Markdown
Collaborator Author

bdellegrazie commented Oct 31, 2025

Not after I made the tests work!

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.

2 participants