Set JDK to 17 LTS (#1450) · stripe/stripe-java@4278752 (original) (raw)

Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ jobs:
30 30 id: setup-jre
31 31 uses: actions/setup-java@v1
32 32 with:
33 -java-version: "18" # always use 18 for building
33 +java-version: "17" # always use 17 LTS for building
34 34 architecture: x64
35 35
36 36 - name: Set Test Java Runtime Environment variable
@@ -79,7 +79,7 @@ jobs:
79 79 - name: Setup Java
80 80 uses: actions/setup-java@v1
81 81 with:
82 -java-version: "18" # always use 18 for building
82 +java-version: "17" # always use 17 LTS for building
83 83 architecture: x64
84 84
85 85 - name: Tweak gradle.properties for Java 1.8
@@ -99,7 +99,7 @@ jobs:
99 99
100 100 - name: Send code coverage report to coveralls.io
101 101 run: ./gradlew jacocoTestReport coveralls
102 -if: matrix.java-version == '18'
102 +if: matrix.java-version == '17'
103 103 env:
104 104 CI_NAME: github-actions
105 105 COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
@@ -117,7 +117,7 @@ jobs:
117 117 id: setup-jre
118 118 uses: actions/setup-java@v1
119 119 with:
120 -java-version: "18" # always use 18 for building
120 +java-version: "17" # always use 17 LTS for building
121 121 architecture: x64
122 122 - name: Set Test Java Runtime Environment variable
123 123 run: echo "JAVA_TEST_HOME=${{ steps.setup-jre.outputs.path }}" >> $GITHUB_ENV
@@ -153,7 +153,7 @@ jobs:
153 153 id: setup-jre
154 154 uses: actions/setup-java@v1
155 155 with:
156 -java-version: "18" # always use 18 for building
156 +java-version: "17" # always use 17 TLS for building
157 157 architecture: x64
158 158 - name: Set Test Java Runtime Environment variable
159 159 run: echo "JAVA_TEST_HOME=${{ steps.setup-jre.outputs.path }}" >> $GITHUB_ENV
Original file line number Diff line number Diff line change
@@ -265,7 +265,7 @@ New features and bug fixes are released on the latest major version of the Strip
265 265
266 266 ## Development
267 267
268 -JDK 18 is required to build the Stripe Java library. By default, tests use the same Java runtime as the build.
268 +JDK 17 is required to build the Stripe Java library. By default, tests use the same Java runtime as the build.
269 269 To use a custom version of Java runtime for tests set the `JAVA_TEST_HOME` environment variable to runtime's
270 270 home directory.
271 271
Original file line number Diff line number Diff line change
@@ -29,8 +29,8 @@ version = VERSION_NAME
29 29
30 30 tasks.withType(JavaCompile) {
31 31 JavaVersion compilerJavaVersionEnum = JavaVersion.current()
32 -if (compilerJavaVersionEnum != JavaVersion.VERSION_18) {
33 -throw new GradleException("JDK 18 is required to build Stripe")
32 +if (compilerJavaVersionEnum != JavaVersion.VERSION_17) {
33 +throw new GradleException("JDK 17 is required to build Stripe")
34 34 }
35 35
36 36 options.release = project.targetCompatibility.majorVersion as Integer