Skip to content

Commit aa14de9

Browse files
Upgrade to JDK 17 and Gradle 8.14.3 (targeting Java 11 bytecode) (#284)
* Initial plan * Upgrade to Java 17 and Gradle 8.5 Co-authored-by: keesvandieren <863966+keesvandieren@users.noreply.github.com> * Remove outdated Java 8 compatibility check Co-authored-by: keesvandieren <863966+keesvandieren@users.noreply.github.com> * Update to Gradle 8.14.3 and configure GitHub Actions to use .java-version file Co-authored-by: keesvandieren <863966+keesvandieren@users.noreply.github.com> * Update GitHub Actions checkout to v4 Co-authored-by: keesvandieren <863966+keesvandieren@users.noreply.github.com> * Set targetCompatibility to Java 11 while building with JDK 17 Co-authored-by: keesvandieren <863966+keesvandieren@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: keesvandieren <863966+keesvandieren@users.noreply.github.com>
1 parent 4cf8914 commit aa14de9

13 files changed

Lines changed: 38 additions & 33 deletions

File tree

.github/workflows/compile.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up JDK 11
18-
uses: actions/setup-java@v1
16+
- uses: actions/checkout@v4
17+
- name: Set up JDK from .java-version
18+
uses: actions/setup-java@v4
1919
with:
20-
java-version: 11
20+
distribution: 'temurin'
21+
java-version-file: '.java-version'
2122
- name: Grant execute permission for gradlew
2223
run: chmod +x gradlew
2324
- name: Setup Android build environment

.github/workflows/publish_release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up JDK 11
18-
uses: actions/setup-java@v1
16+
- uses: actions/checkout@v4
17+
- name: Set up JDK from .java-version
18+
uses: actions/setup-java@v4
1919
with:
20-
java-version: 11
20+
distribution: 'temurin'
21+
java-version-file: '.java-version'
2122
- name: Grant execute permission for gradlew
2223
run: chmod +x gradlew
2324
- name: Setup Android build environment

.github/workflows/publish_snapshot.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up JDK 11
18-
uses: actions/setup-java@v1
16+
- uses: actions/checkout@v4
17+
- name: Set up JDK from .java-version
18+
uses: actions/setup-java@v4
1919
with:
20-
java-version: 11
20+
distribution: 'temurin'
21+
java-version-file: '.java-version'
2122
- name: Grant execute permission for gradlew
2223
run: chmod +x gradlew
2324
- name: Setup Android build environment

.java-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
11
1+
17

build.gradle

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tasks.named('wrapper') {
2-
gradleVersion = '7.5.1'
2+
gradleVersion = '8.14.3'
33
distributionUrl = "https://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
44
}
55

@@ -82,7 +82,7 @@ buildscript {
8282
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
8383
}
8484
dependencies {
85-
classpath "com.android.tools.build:gradle:7.2.2"
85+
classpath "com.android.tools.build:gradle:8.2.0"
8686
classpath "com.mobidevelop.robovm:robovm-gradle-plugin:${roboVMVersion}"
8787
}
8888
}
@@ -106,15 +106,14 @@ allprojects {
106106
}
107107

108108
tasks.withType(JavaCompile) {
109-
sourceCompatibility = JavaVersion.VERSION_1_8
110-
targetCompatibility = JavaVersion.VERSION_1_8
109+
sourceCompatibility = JavaVersion.VERSION_11
110+
targetCompatibility = JavaVersion.VERSION_11
111111
}
112112
}
113113

114-
if (JavaVersion.current().isJava8Compatible()) {
115-
allprojects {
116-
tasks.withType(Javadoc) {
117-
options.addStringOption('Xdoclint:none', '-quiet')
118-
}
114+
// Java 17+ is required, so Javadoc linting is always available
115+
allprojects {
116+
tasks.withType(Javadoc) {
117+
options.addStringOption('Xdoclint:none', '-quiet')
119118
}
120119
}

gdx-pay-android-amazon/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
apply plugin: 'com.android.library'
22
apply from : '../publish_android.gradle'
33

4-
sourceCompatibility = 1.7
5-
targetCompatibility = 1.7
4+
sourceCompatibility = 11
5+
targetCompatibility = 11
66

77
android {
8+
namespace 'com.badlogic.gdx.pay.android.amazon'
89
compileSdkVersion androidCompileSdkVersion
910
buildToolsVersion androidBuildToolsVersion
1011

gdx-pay-android-googlebilling/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apply plugin: 'com.android.library'
33
apply from : '../publish_android.gradle'
44

55
android {
6+
namespace 'com.badlogic.gdx.pay.android.googlebilling'
67
compileSdkVersion androidCompileSdkVersion
78
buildToolsVersion androidBuildToolsVersion
89

gdx-pay-android-huawei/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apply plugin: 'com.android.library'
33
apply from : '../publish_android.gradle'
44

55
android {
6+
namespace 'com.badlogic.gdx.pay.android.huawei'
67
compileSdkVersion androidCompileSdkVersion
78
buildToolsVersion androidBuildToolsVersion
89

gdx-pay-client/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apply plugin : 'java-library'
22
apply from : '../publish_java.gradle'
33

4-
sourceCompatibility = 1.7
5-
targetCompatibility = 1.7
4+
sourceCompatibility = 11
5+
targetCompatibility = 11
66

77
sourceSets {
88
main {

gdx-pay-iosrobovm-apple/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apply plugin : 'java-library'
22
apply plugin : 'robovm'
33
apply from : '../publish_java.gradle'
44

5-
sourceCompatibility = 1.7
6-
targetCompatibility = 1.7
5+
sourceCompatibility = 11
6+
targetCompatibility = 11
77

88

99
dependencies {

0 commit comments

Comments
 (0)