Skip to content

Commit 65d76e5

Browse files
authored
chore: test Java 21 (GoogleCloudPlatform#636)
This matches the official policy: https://cloud.google.com/java/docs/supported-java-versions
1 parent 8a2c61a commit 65d76e5

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ jobs:
3838
strategy:
3939
fail-fast: false
4040
matrix:
41-
java: [8, 11, 17]
41+
# We match the official policy:
42+
# https://cloud.google.com/java/docs/supported-java-versions
43+
java: [8, 11, 17, 21]
4244
steps:
4345
- name: Checkout code
4446
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -121,7 +123,7 @@ jobs:
121123
runs-on: ubuntu-latest
122124
strategy:
123125
matrix:
124-
java: [8, 11, 17]
126+
java: [8, 11, 17, 21]
125127
steps:
126128
- name: Checkout code
127129
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.kokoro/dependencies.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,14 @@ function determineMavenOpts() {
3838
| sed -E 's/^(1\.[0-9]\.0).*$/\1/g'
3939
)
4040

41-
if [[ $javaVersion == 17* ]]
42-
then
43-
# MaxPermSize is no longer supported as of jdk 17
44-
echo -n "-Xmx1024m"
45-
else
46-
echo -n "-Xmx1024m -XX:MaxPermSize=128m"
47-
fi
41+
echo -n "-Xmx1024m"
4842
}
4943

5044
export MAVEN_OPTS=$(determineMavenOpts)
5145

5246
# this should run maven enforcer
5347
retry_with_backoff 3 10 \
54-
mvn install -B -V -ntp \
48+
./mvnw install -B -V -ntp \
5549
-DskipTests=true \
5650
-Dmaven.javadoc.skip=true \
5751
-Dclirr.skip=true

0 commit comments

Comments
 (0)