name: Check # Compiles every Minecraft version on pull requests, so a change that breaks # one version (e.g. a missed or bad port) fails before it's merged instead of # in the release build. Merges to master aren't re-checked: the PR already # checked that code. on: pull_request: jobs: compile: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: submodules: true # The JDK comes from the runner's tool cache. `cache: gradle` stores Gradle's # dependencies, Loom's Minecraft cache and the build cache in the runner's # actions cache. # 1.21.x builds with Java 21 and 26.x with Java 25. The last version listed is the default # (Gradle runs on it), and the Gradle commands below point toolchain detection at both. - name: Set up Java 25 and 21 uses: actions/setup-java@v5 with: distribution: temurin java-version: | 25 21 cache: gradle - name: Compile all versions run: | chmod +x gradlew # --continue reports every version that fails, not just the first. ./gradlew compileJava --no-daemon --stacktrace --continue \ -Porg.gradle.java.installations.fromEnv=JAVA_HOME_21_X64,JAVA_HOME_25_X64