Skip to content

Commit 5be3669

Browse files
authored
Bump build requirements to Java 21 (#735)
Bump build requirements to Java 21 Newer Gradle plugins, for example [spotless](https://github.com/projectnessie/cel-java/actions/runs/17985873576/job/51163753246?pr=732#logs), require Java 17 or newer. CI already used Java 17, changed to 21 as the "main" Java matrix job and removed Java 17 from the CI matrix. Also updated/fixed README files.
1 parent 6238ad4 commit 5be3669

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
max-parallel: 4
2828
matrix:
29-
java-version: [17, 21, 24]
29+
java-version: [21, 24]
3030
steps:
3131
- uses: actions/checkout@v5
3232
with:
@@ -46,7 +46,7 @@ jobs:
4646
- name: Spotless Check
4747
# Spotless must run in a different invocation, because
4848
# it has some weird Gradle configuration/variant issue
49-
if: ${{ matrix.java-version == '17' }}
49+
if: ${{ matrix.java-version == '21' }}
5050
run: ./gradlew spotlessCheck --scan
5151

5252
- name: Build
@@ -61,7 +61,7 @@ jobs:
6161
run: ./gradlew jmh
6262

6363
- name: Cache Bazel stuff
64-
if: ${{ matrix.java-version == '17' }}
64+
if: ${{ matrix.java-version == '21' }}
6565
uses: actions/cache@v4
6666
with:
6767
path: |
@@ -70,7 +70,7 @@ jobs:
7070
restore-keys: bazel-
7171

7272
- name: Conformance tests
73-
if: ${{ matrix.java-version == '17' }}
73+
if: ${{ matrix.java-version == '21' }}
7474
run: conformance/run-conformance-tests.sh
7575

7676
- name: Capture test results

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ jobs:
6161
SHA=$(git rev-parse HEAD)
6262
gh api repos/projectnessie/cel-java/commits/${SHA}/check-runs --jq 'if ([.check_runs[] | select(.name | endswith("Release") or startswith("Dependabot ") or startswith("codecov/") or startswith("Report") | not ) | .conclusion // "pending" ] | unique == ["success"] or unique == []) then "OK" else error("Commit checks are not OK") end'
6363
64-
- name: Set up JDK 11
64+
- name: Set up JDK
6565
uses: actions/setup-java@v5
6666
with:
6767
distribution: 'temurin'
68-
java-version: 17
68+
java-version: 21
6969
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
7070
gpg-passphrase: MAVEN_GPG_PASSPHRASE
7171

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Gradle
33
build/
44
.gradle/
5+
buildSrc/.kotlin/
56

67
# Maven
78
**/.mvn/wrapper/maven-wrapper.jar

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ Those submodules are required to build the CEL-Java project.
296296
You need to run `git submodule init` and `git submodule update` after a fresh clone of this repo.
297297

298298
Build requirements:
299-
* Java 11 or newer, it's a Gradle-wrapper build (it's fast ;) )
299+
* Java 21 or newer, it's a Gradle-wrapper build (it's fast ;) )
300300

301301
Runtime requirements:
302302
* Java 8 or newer

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ dependencies {
3434
implementation(libs.errorprone.plugin)
3535
}
3636

37-
java { toolchain { languageVersion.set(JavaLanguageVersion.of(11)) } }
37+
java { toolchain { languageVersion.set(JavaLanguageVersion.of(21)) } }

conformance/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ If your environment is already setup, just run the shell script
1010
The CEL-spec conformance test suite is written in Go and uses the bazel build tool.
1111

1212
Required tools:
13-
* [Bazel build tool](https://bazel.build/)
13+
* [Bazel build tool](https://bazel.build/) (see [bazelisk](https://github.com/bazelbuild/bazelisk?tab=readme-ov-file#installation))
1414

1515
See [Bazel web site](https://bazel.build/install) for installation instructions.
1616
Do **not** use the `bazel-bootstrap` package on Ubuntu, because it comes with

0 commit comments

Comments
 (0)