File tree Expand file tree Collapse file tree 6 files changed +26
-30
lines changed Expand file tree Collapse file tree 6 files changed +26
-30
lines changed Original file line number Diff line number Diff line change 2929 "allowedVersions" : "!/(-alpha|-Alpha|-ALPHA|-beta|-Beta|-BETA|-milestone|-m|-SNAPSHOT)/"
3030 }
3131 ] ,
32+ ignorePresets : [
33+ // Ensure we get the latest version and are not pinned to old versions.
34+ 'workarounds:javaLTSVersions' ,
35+ ] ,
3236 "customManagers" : [
3337 {
3438 "customType" : "regex" ,
3539 "fileMatch" : [ "\\.versions.toml$" ] ,
3640 "matchStrings" : [ "(^|\n)(?<depName>gradle) *= *\"(?<currentValue>.*)\"" ] ,
3741 "depNameTemplate" : "gradle" ,
3842 "datasourceTemplate" : "gradle-version"
39- }
43+ } ,
44+ // Update .java-version file with the latest JDK version.
45+ {
46+ customType : 'regex' ,
47+ fileMatch : [
48+ '\\.java-version$' ,
49+ ] ,
50+ matchStrings : [
51+ '(?<currentValue>.*)\\n' ,
52+ ] ,
53+ datasourceTemplate : 'java-version' ,
54+ depNameTemplate : 'java' ,
55+ // Only write the major version.
56+ extractVersionTemplate : '^(?<version>\\d+)' ,
57+ } ,
4058 ]
4159}
Original file line number Diff line number Diff line change 1+ 24
Original file line number Diff line number Diff line change @@ -12,29 +12,21 @@ concurrency:
1212
1313jobs :
1414 build :
15- name : JDK ${{ matrix.java_version }}, Config ${{ matrix.test_config_method }}
15+ name : Config ${{ matrix.test_config_method }}
1616 runs-on : ubuntu-latest
1717
1818 strategy :
1919 matrix :
20- java_version : [11, 17, 24]
2120 test_config_method : ["DSL", "PROPERTIES", "BASE"]
2221
2322 steps :
2423 - name : Checkout
2524 uses : actions/checkout@v5
2625
27- - name : Install JDK ${{ matrix.java_version }}
28- uses : actions/setup-java@v5
26+ - uses : actions/setup-java@v5
2927 with :
3028 distribution : zulu
31- java-version : ${{ matrix.java_version }}
32-
33- - name : Install JDK 24
34- uses : actions/setup-java@v5
35- with :
36- distribution : zulu
37- java-version : 24
29+ java-version-file : .github/workflows/.java-version
3830
3931 - name : Accept Android SDK license
4032 run : echo -e "24333f8a63b6825ea9c5514f83c2829b004d1fee\n" > "$ANDROID_HOME/licenses/android-sdk-license"
4335
4436 - name : Run ktlint
4537 run : ./kotlinw ktlint.main.kts --fail-on-changes
46- if : ${{ matrix.java_version != '11' }}
4738
4839 - name : Build with Gradle
49- run : ./gradlew build --stacktrace -DtestJavaVersion=${{ matrix.java_version }} - DtestConfigMethod=${{ matrix.test_config_method }}
40+ run : ./gradlew build --stacktrace -DtestConfigMethod=${{ matrix.test_config_method }}
5041
5142 # Status check that is required in branch protection rules.
5243 build-status :
Original file line number Diff line number Diff line change 2121 uses : actions/setup-java@v5
2222 with :
2323 distribution : zulu
24- java-version : 11
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 : 11
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 @@ -141,13 +141,6 @@ tasks.validatePlugins {
141141 enableStricterValidation = true
142142}
143143
144- tasks.whenTaskAdded {
145- if (name.contains(" lint" ) && this ::class .java.name.contains(" com.android.build" )) {
146- // TODO: lints can be run on Java 17 or above, remove this once we bump the min Java version to 17.
147- enabled = JavaVersion .current() >= JavaVersion .VERSION_17
148- }
149- }
150-
151144val integrationTest by tasks.registering(Test ::class ) {
152145 dependsOn(
153146 tasks.publishToMavenLocal,
@@ -161,13 +154,6 @@ val integrationTest by tasks.registering(Test::class) {
161154 testClassesDirs = integrationTestSourceSet.output.classesDirs
162155 classpath = integrationTestSourceSet.runtimeClasspath
163156
164- val testJavaVersion = System .getProperty(" testJavaVersion" )
165- if (testJavaVersion != null ) {
166- javaLauncher = javaToolchains.launcherFor {
167- languageVersion = JavaLanguageVersion .of(testJavaVersion.toInt())
168- }
169- }
170-
171157 useJUnitPlatform()
172158 testLogging.showStandardStreams = true
173159 maxHeapSize = " 2g"
You can’t perform that action at this time.
0 commit comments