Upgrade Gradle to v9.5.1 from v8.5#278
Conversation
| sourceSets.create('it') { | ||
| compileClasspath += sourceSets.main.output | ||
| runtimeClasspath += sourceSets.main.output | ||
| compileClasspath += sourceSets.testFixtures.output | ||
| runtimeClasspath += sourceSets.testFixtures.output | ||
| } |
There was a problem hiding this comment.
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.
| ${{ matrix.java }} | ||
| 21 | ||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2 |
There was a problem hiding this comment.
eskatos/gradle-command-action has been moved to gradle/actions/setup-gradle finally.
|
it's ready to be reviewed after #277 is merged into master branch~ |
|
It's ready to be reviewed! |
| } | ||
| signing { | ||
| required { isReleaseVersion && gradle.taskGraph.hasTask("publish") } | ||
| required = isReleaseVersion && gradle.taskGraph.hasTask("publish") |
There was a problem hiding this comment.
Is removing {} safe here?
In my understanding, this makes the evaluation to be eager, then evaluated at configuration timing before graph is finalized, so it may bypass the check and may be evaluated as false unintentionally
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:
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.