From 6585d8906ebe9aff76dd85b3778b2f3eddf9dfd7 Mon Sep 17 00:00:00 2001 From: Matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com> Date: Thu, 5 Sep 2024 07:21:23 +0300 Subject: [PATCH] [no ci] Bump JCC and use the custom Java version action (#1515) --- .github/workflows/build-prs.yml | 12 ++++-------- .github/workflows/check-local-changes.yml | 7 +++---- .github/workflows/test-prs.yml | 7 +++---- projects/neoforge/build.gradle | 6 ++++-- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-prs.yml b/.github/workflows/build-prs.yml index 32717e93ef..9d70bf8a29 100644 --- a/.github/workflows/build-prs.yml +++ b/.github/workflows/build-prs.yml @@ -31,17 +31,13 @@ jobs: run: git switch -C pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }} - - name: Validate wrapper - uses: gradle/actions/wrapper-validation@v3 - - name: Setup JDK 21 - uses: actions/setup-java@v2 + uses: neoforged/actions/setup-java@main with: - java-version: '21' - distribution: 'temurin' + java-version: 21 - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 with: cache-read-only: false @@ -58,4 +54,4 @@ jobs: uses: neoforged/action-jar-compatibility/upload@v1 - name: Publish artifacts - uses: neoforged/action-pr-publishing/upload@v1 + uses: neoforged/action-pr-publishing/upload@v1 \ No newline at end of file diff --git a/.github/workflows/check-local-changes.yml b/.github/workflows/check-local-changes.yml index f40a77a4cf..ef101ceacd 100644 --- a/.github/workflows/check-local-changes.yml +++ b/.github/workflows/check-local-changes.yml @@ -25,13 +25,12 @@ jobs: git switch -C pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }} - name: Setup JDK 21 - uses: actions/setup-java@v2 + uses: neoforged/actions/setup-java@main with: - java-version: '21' - distribution: 'temurin' + java-version: 21 - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 with: cache-read-only: false diff --git a/.github/workflows/test-prs.yml b/.github/workflows/test-prs.yml index 0fff8674c4..51afdcddad 100644 --- a/.github/workflows/test-prs.yml +++ b/.github/workflows/test-prs.yml @@ -29,13 +29,12 @@ jobs: git switch -C pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }} - name: Setup JDK 21 - uses: actions/setup-java@v2 + uses: neoforged/actions/setup-java@main with: - java-version: '21' - distribution: 'temurin' + java-version: 21 - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 with: cache-read-only: false diff --git a/projects/neoforge/build.gradle b/projects/neoforge/build.gradle index 0393b5455b..cb86838bb3 100644 --- a/projects/neoforge/build.gradle +++ b/projects/neoforge/build.gradle @@ -1,10 +1,11 @@ import net.neoforged.jarcompatibilitychecker.gradle.JCCPlugin +import net.neoforged.jarcompatibilitychecker.gradle.CompatibilityTask import net.neoforged.jarcompatibilitychecker.gradle.ProvideNeoForgeJarTask plugins { id 'java-library' id 'maven-publish' - id 'net.neoforged.jarcompatibilitychecker' version '0.1.9' + id 'net.neoforged.jarcompatibilitychecker' version '0.1.12' id 'net.neoforged.gradleutils' id 'neoforge.versioning' } @@ -23,7 +24,8 @@ dynamicProject { } final checkVersion = JCCPlugin.providePreviousVersion( - project.providers, project.providers.provider({['https://maven.neoforged.net/releases']}), project.providers.provider({'net.neoforged:neoforge'}) + project.providers, project.providers.provider({['https://maven.neoforged.net/releases']}), project.providers.provider({'net.neoforged:neoforge'}), + project.provider { project.version }.map { ver -> CompatibilityTask.VersionComponentTest.MINOR.predicate(ver) } ) final createCompatJar = tasks.register('createCompatibilityCheckJar', ProvideNeoForgeJarTask) { // Use the same jar that the patches were generated against