Skip to content

Commit

Permalink
[no ci] Bump JCC and use the custom Java version action (#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt authored Sep 5, 2024
1 parent dee6221 commit 6585d89
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/build-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
7 changes: 3 additions & 4 deletions .github/workflows/check-local-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/test-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions projects/neoforge/build.gradle
Original file line number Diff line number Diff line change
@@ -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'
}
Expand All @@ -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
Expand Down

0 comments on commit 6585d89

Please sign in to comment.