diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82a9c19..eaed684 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,10 @@ jobs: with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v5 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: maven diff --git a/.tool-versions b/.tool-versions index 8d6041d..536a087 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -java temurin-17.0.15+6 +java temurin-21.0.9+10.0.LTS diff --git a/CHANGELOG.md b/CHANGELOG.md index 682de74..a13c896 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Rename recipe `io.github.mhagnumdw.FormatSqlBlockRecipe` to `io.github.mhagnumdw.recipes.FormatSqlTextBlockByAnnotation` - Rename recipe `io.github.mhagnumdw.FormatSqlFileRecipe` to `io.github.mhagnumdw.recipes.FormatSqlFile` +### Changed + +- Migrate test source code to JDK 21 + ### Fixed - **FormatSqlFile**: Preserves the trailing newline of the file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 15cb2d3..dd7d5ec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ If you have an idea for a new feature or an improvement to an existing one, plea ## Development -This project uses Java 8 for the main source and Java 17 for the test source. When importing into Eclipse as a Maven project, you need to manually change to Java 17: `right-click on the project > Build Path > Configure Build Path... > Libraries`, remove Java 8 and add Java 17 using the `Add Library...` button. +This project uses Java 8 for the main source and Java 21 for the test source. When importing into Eclipse as a Maven project, you need to manually change to Java 21: `right-click on the project > Build Path > Configure Build Path... > Libraries`, remove Java 8 and add Java 21 using the `Add Library...` button. To test in the real environment during development, just install the JAR and reference the SNAPSHOT version: diff --git a/README.md b/README.md index b29fdc9..4effed7 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ A set of [OpenRewrite](https://docs.openrewrite.org/) recipes for formatting SQL - [Usage](#usage) - [Configuring in `pom.xml`](#configuring-in-pomxml) - [Without adding anything to the project](#without-adding-anything-to-the-project) +- [Compatibility](#compatibility) +- [Changelog](#changelog) - [For Developers](#for-developers) ## Recipes @@ -256,6 +258,16 @@ Then run: > - `io.github.mhagnumdw.recipes.FormatSqlCustomConfig` is the `name` defined in the `rewrite.yml` file. > - For a single recipe, you don't even need to have the `rewrite.yml` file to customize the configuration, see [here](https://docs.openrewrite.org/reference/faq#is-it-possible-to-pass-arguments-to-a-recipe-from-the-command-line). +## Compatibility + +These recipes are compatible with Java projects version 8 or higher. + +> _**For developers**: The project requires JDK 21 to compile and run tests, but uses Java 8 for the recipes (src/main/java). More information in [CONTRIBUTING.md](CONTRIBUTING.md)._ + +## Changelog + +For a detailed list of changes, please see our [CHANGELOG.md](CHANGELOG.md) file. + ## For Developers For details on how to contribute, set up the development environment, run tests, and other development-related information, please see our [CONTRIBUTING.md](CONTRIBUTING.md) file. diff --git a/pom.xml b/pom.xml index 06e2932..72930a9 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ 8 - 17 + 21 UTF-8 mhagnumdw https://sonarcloud.io @@ -83,7 +83,7 @@ org.projectlombok lombok - 1.18.38 + 1.18.46 provided @@ -111,7 +111,7 @@ org.openrewrite - rewrite-java-17 + rewrite-java-21 test @@ -161,7 +161,7 @@ org.jacoco jacoco-maven-plugin - 0.8.13 + 0.8.14 default-prepare-agent