File tree Expand file tree Collapse file tree 7 files changed +26
-7
lines changed
Expand file tree Collapse file tree 7 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 3131 "allowedVersions" : "!/(-alpha|-Alpha|-ALPHA|-beta|-Beta|-BETA|-milestone|-m|-SNAPSHOT)/"
3232 }
3333 ] ,
34+ ignorePresets : [
35+ // Ensure we get the latest version and are not pinned to old versions.
36+ 'workarounds:javaLTSVersions' ,
37+ ] ,
3438 "customManagers" : [
3539 {
3640 "customType" : "regex" ,
3741 "fileMatch" : [ "\\.versions.toml$" ] ,
3842 "matchStrings" : [ "(^|\n)(?<depName>gradle) *= *\"(?<currentValue>.*)\"" ] ,
3943 "depNameTemplate" : "gradle" ,
4044 "datasourceTemplate" : "gradle-version"
45+ } ,
46+ // Update .java-version file with the latest JDK version.
47+ {
48+ customType : 'regex' ,
49+ managerFilePatterns : [
50+ '/\\.java-version$/' ,
51+ ] ,
52+ matchStrings : [
53+ '(?<currentValue>.*)\\n' ,
54+ ] ,
55+ datasourceTemplate : 'java-version' ,
56+ depNameTemplate : 'java' ,
57+ // Only write the major version.
58+ extractVersionTemplate : '^(?<version>\\d+)' ,
4159 }
4260 ]
4361}
Original file line number Diff line number Diff line change 1+ 25
Original file line number Diff line number Diff line change 2020 test_java_version :
2121 - 11 # Minimum supported version.
2222 - 17 # Supported by all tests.
23- - 25 # Latest supported version.
23+ - latest # Latest supported version, the value syncs with the .java-version file .
2424 test_config_method : ["DSL", "PROPERTIES", "BASE"]
2525
2626 steps :
3131 uses : actions/setup-java@v5
3232 with :
3333 distribution : zulu
34- java-version : 25
34+ java-version-file : .github/workflows/.java-version
3535
3636 - name : Accept Android SDK license
3737 run : echo -e "24333f8a63b6825ea9c5514f83c2829b004d1fee\n" > "$ANDROID_HOME/licenses/android-sdk-license"
Original file line number Diff line number Diff line change 3939 uses : actions/setup-java@v5
4040 with :
4141 distribution : zulu
42- java-version : 25
42+ java-version-file : .github/workflows/.java-version
4343
4444 - uses : gradle/actions/setup-gradle@v5
4545 with :
Original file line number Diff line number Diff line change 2121 uses : actions/setup-java@v5
2222 with :
2323 distribution : zulu
24- java-version : 25
24+ java-version-file : .github/workflows/.java-version
2525
2626 - name : Set version for tag
2727 run : |
Original file line number Diff line number Diff line change 2727 uses : actions/setup-java@v5
2828 with :
2929 distribution : zulu
30- java-version : 25
30+ java-version-file : .github/workflows/.java-version
3131
3232 - name : Set version
3333 run : |
Original file line number Diff line number Diff line change @@ -138,9 +138,9 @@ val integrationTest by tasks.registering(Test::class) {
138138 classpath = integrationTestSourceSet.runtimeClasspath
139139
140140 val testJavaVersion = providers.gradleProperty(" testJavaVersion" ).orNull
141- if (testJavaVersion != null ) {
141+ if (testJavaVersion != null && testJavaVersion != " latest " ) {
142142 javaLauncher = javaToolchains.launcherFor {
143- languageVersion = JavaLanguageVersion .of(testJavaVersion.toInt() )
143+ languageVersion = JavaLanguageVersion .of(testJavaVersion)
144144 }
145145 }
146146
You can’t perform that action at this time.
0 commit comments