diff --git a/.github/actions/setup-gradle-build/action.yml b/.github/actions/setup-gradle-build/action.yml index 6febb231c7..0d91be95ba 100644 --- a/.github/actions/setup-gradle-build/action.yml +++ b/.github/actions/setup-gradle-build/action.yml @@ -22,7 +22,7 @@ runs: distribution: 'zulu' java-version: | # last version (set as default) should match all `jvmToolchain(xxx)` calls in the project ${{ inputs.additional-java-versions }} - 20 + 21 # Please note these settings will override the ones set via `gradle.properties` committed to the repository - https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties # List of optimizations: diff --git a/.github/workflows/generate-changelog.yml b/.github/workflows/generate-changelog.yml index 75e6139bd1..3eba93fb9d 100644 --- a/.github/workflows/generate-changelog.yml +++ b/.github/workflows/generate-changelog.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: 19 + java-version: 21 - uses: gradle/gradle-build-action@v2 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index ef9b8de6cc..6bc3a8914d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Changed +* Use Java 21 for compilation [#2319](https://github.com/pinterest/ktlint/issues/2319) + ## [1.0.1] - 2023-10-13 ### 🆕 Features diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bc87f61ab4..688fd56b85 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] # The java-compilation version is the latest supported (not necessarily LTS) version of Java. It should be identical to Java-version used in `actions/setup-java` -java-compilation = "20" +java-compilation = "21" # The java-target version is the lowest supported LTS version of Java. Jar's produced are bytecode compatible with this version. java-target = "8" kotlin = "1.9.10"