From 2abda4ee831298c380c47bfd3bd3cef3bbbdbea7 Mon Sep 17 00:00:00 2001 From: micronaut-build Date: Fri, 13 Oct 2023 05:56:01 +0000 Subject: [PATCH 1/2] Update common files --- .editorconfig | 3 +++ .github/workflows/graalvm-latest.yml | 8 +++++--- .github/workflows/gradle.yml | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index a9a165ba..6ef5d690 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,6 +12,9 @@ end_of_line = lf [{*.bat,*.cmd}] end_of_line = crlf +[{*.mustache,*.ftl}] +insert_final_newline = false + [*.java] indent_size = 4 tab_width = 4 diff --git a/.github/workflows/graalvm-latest.yml b/.github/workflows/graalvm-latest.yml index bfbfff34..d150aa60 100644 --- a/.github/workflows/graalvm-latest.yml +++ b/.github/workflows/graalvm-latest.yml @@ -34,7 +34,9 @@ jobs: runs-on: ubuntu-latest strategy: max-parallel: 6 - matrix: ${{ fromJson(needs.build_matrix.outputs.matrix) }} + matrix: + java: ['17', '21'] + native_test_task: ${{ fromJson(needs.build_matrix.outputs.matrix).native_test_task }} env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} @@ -46,7 +48,7 @@ jobs: id: pre-build with: distribution: 'graalvm' - java: '17' + java: ${{ matrix.java }} - name: Build Steps uses: micronaut-projects/github-actions/graalvm/build@master id: build @@ -60,4 +62,4 @@ jobs: uses: micronaut-projects/github-actions/graalvm/post-build@master id: post-build with: - java: '17' + java: ${{ matrix.java }} diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index f6018245..7c0d4941 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: ['17'] + java: ['17', '21'] env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} @@ -64,7 +64,7 @@ jobs: ./gradlew check --no-daemon --continue - name: "🔎 Run static analysis" - if: env.SONAR_TOKEN != '' + if: env.SONAR_TOKEN != '' && matrix.java == '17' run: | ./gradlew sonar From 1322951b7fe90fdb85f794d38712e020eb16ec9a Mon Sep 17 00:00:00 2001 From: Tim Yates Date: Fri, 13 Oct 2023 09:20:44 +0100 Subject: [PATCH 2/2] Set the target for buildSrc to java 17 --- buildSrc/build.gradle.kts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 4b64cd1a..889b9092 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { `kotlin-dsl` } @@ -10,3 +12,12 @@ repositories { dependencies { implementation("io.micronaut.build.internal.publishing:io.micronaut.build.internal.publishing.gradle.plugin:6.5.7") } + +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + +kotlin { + this.compilerOptions.jvmTarget.set(JvmTarget.JVM_17) +}