Skip to content

Commit f9aa8ee

Browse files
committed
chore: bump minimal test Java version to 17 (keep targeting Java 8 bytecode for the main artifac)
Test libraries require Java 17 (e.g. com.adobe.testing:s3mock-junit5), so we bump the minimal Java when executing the tests. It should not affect the resulting bytecode for the main artifact, however, it does inded make the plugin less tested with Java 8 runtime.
1 parent fe89401 commit f9aa8ee

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/setup-java@v4
2424
with:
2525
java-version: |
26-
8
26+
17
2727
21
2828
distribution: 'zulu'
2929
- uses: actions/cache@v4
@@ -32,11 +32,11 @@ jobs:
3232
path: |
3333
~/.gradle/caches/
3434
key: gradle-${{ runner.os }}-caches-${{ hashFiles('build.properties', '**/*.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties') }}
35-
- name: Test with Java 8
35+
- name: Test with Java 17
3636
uses: eskatos/gradle-command-action@v3
3737
with:
3838
gradle-version: wrapper
39-
arguments: --no-parallel --no-daemon build
39+
arguments: --no-parallel --no-daemon PtestJdk=17 build
4040
- name: Test with Java 21
4141
uses: eskatos/gradle-command-action@v3
4242
with:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Key improvements are (as of 2020-07-24):
2323

2424
* Version 1.0.0 - Gradle 4.1+
2525
* Gradle configuration cache - Gradle 7.5+, see https://github.com/gradle/gradle/issues/14874
26+
* Java 8+: the build targets Java 8 bytecode and class libraries. It is recommended to use Java 17+ for launching Gradle though.
2627

2728
## Use in your project
2829

build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ dependencies {
6565
testImplementation(platform("org.junit:junit-bom:5.13.4"))
6666
testImplementation("org.junit.jupiter:junit-jupiter-api")
6767
testImplementation("org.junit.jupiter:junit-jupiter-params")
68-
testImplementation("com.adobe.testing:s3mock-junit5:2.17.0") {
68+
testImplementation("com.adobe.testing:s3mock-junit5:4.7.0") {
6969
// Gradle has its own logging
7070
exclude("ch.qos.logback", "logback-classic")
7171
exclude("org.apache.logging.log4j", "log4j-to-slf4j")
@@ -195,6 +195,10 @@ allprojects {
195195
options.release.set(targetJdk)
196196
}
197197

198+
compileTestJava {
199+
options.release.set(testJdk)
200+
}
201+
198202
afterEvaluate {
199203
// Add default license/notice when missing (e.g. see :src:config that overrides LICENSE)
200204
configureEach<Jar> {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ description=Gradle S3 Build Cache
88
centralPortalPublishingTimeout=180
99
buildJdk=21
1010
targetJdk=8
11-
testJdk=8
11+
testJdk=17

renovate.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
"labels": ["dependencies"],
77
"schedule": ["every 3 weeks on Monday"],
88
"packageRules": [
9-
{
10-
"matchPackageNames": ["com.adobe.testing:s3mock-junit5"],
11-
"groupName": "s3mock-junit5",
12-
"allowedVersions": "< 3.0"
13-
},
149
{
1510
"matchPackagePrefixes": ["com.github.vlsi"],
1611
"groupName": "com.github.vlsi"

0 commit comments

Comments
 (0)