Skip to content

Upgrade Gradle to v9.5 from v8.5#278

Draft
Yang-33 wants to merge 4 commits into
version-catalogfrom
gradle-9-5
Draft

Upgrade Gradle to v9.5 from v8.5#278
Yang-33 wants to merge 4 commits into
version-catalogfrom
gradle-9-5

Conversation

@Yang-33
Copy link
Copy Markdown
Contributor

@Yang-33 Yang-33 commented May 9, 2026

The current Gradle version is from two years ago. Let’s upgrade it to v9. The guide is here:
https://docs.gradle.org/current/userguide/upgrading_major_version_9.html

There were almost no difficult parts.

The main points are:

  1. Some old plugin versions caused build failure because they do not support Gradle v9, so this change upgrades the plugin versions.
  2. Test tasks now require stricter classpath and directory configuration. This affected the integration tests. To be safe, this change confirms that the number of executed tests after this change matches the current master branch, 215 unit tests + 41 itests.
  3. junit-platform-launcher, which was previously used implicitly, now needs to be declared explicitly, so this change adds it.

A local publish comparison was also performed, confirming no major impact on the JARs.

@Yang-33 Yang-33 changed the title Upgrade gradle v9.5 from v8.5 Upgrade gradle to v9.5 from v8.5 May 9, 2026
@Yang-33 Yang-33 changed the title Upgrade gradle to v9.5 from v8.5 Upgrade Gradle to v9.5 from v8.5 May 9, 2026
Comment thread build.gradle
Comment on lines +88 to +93
sourceSets.create('it') {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
compileClasspath += sourceSets.testFixtures.output
runtimeClasspath += sourceSets.testFixtures.output
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order here is important.

Since Gradle 8.14.4, accessing reserved configuration names derived from sourceSet before creating sourceSets has been deprecated. In Gradle 9, it becomes an error.

Without this change, the following error occurs:

Configuration with name 'itImplementation' not found.

Comment thread .github/workflows/ci.yml
${{ matrix.java }}
21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yang-33 Yang-33 mentioned this pull request May 9, 2026
5 tasks
@Yang-33
Copy link
Copy Markdown
Contributor Author

Yang-33 commented May 11, 2026

it's ready to be reviewed after #277 is merged into master branch~

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.

1 participant