- gradle wrapper 8.14.3 -> 9.6.1 (supports Java 25 -> unblocks mc 26.x matrix) - shadow plugin io.github.goooler.shadow 8.1.8 -> com.gradleup.shadow 9.6.1 (Gradle 9 compatible) - fix ProcessResources expand null description under Gradle 9 strict typing - matrix: 1.19.2/1.20.1 java 17 -> 21 (plugin requires Java 21; lolib jar is 21 bytecode) Verified locally: default 1.20.4 quality gate, 1.19.2, 1.20.1, 1.21, 1.21.11 all green. 26.x builds now run on Gradle 9 in CI (needs JDK 25).
64 lines
2.5 KiB
YAML
64 lines
2.5 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
# Build a shadowJar per Minecraft version against the matching Paper API.
|
|
build-matrix:
|
|
name: Build mc-${{ matrix.mc }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
# 1.19.2 / 1.20.1 — Java 21 (plugin requires Java 21+; lolib jar is 21 bytecode)
|
|
- { mc: "1.19.2", coordinate: "io.papermc.paper:paper-api:1.19.2-R0.1-SNAPSHOT", java: 21, release: 21, api: "1.19" }
|
|
- { mc: "1.20.1", coordinate: "io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT", java: 21, release: 21, api: "1.20" }
|
|
# 1.21 — Java 21
|
|
- { mc: "1.21", coordinate: "io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT", java: 21, release: 21, api: "1.20" }
|
|
# 1.21.11 — Java 21
|
|
- { mc: "1.21.11", coordinate: "io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT", java: 21, release: 21, api: "1.21" }
|
|
# 26.1.2 / 26.2 — Java 25 (new-style paper-api build artifacts; requires the
|
|
# Gradle 9 wrapper + com.gradleup.shadow 9.x, which support running on Java 25).
|
|
- { mc: "26.1.2", coordinate: "io.papermc.paper:paper-api:26.1.2.build.74-stable", java: 25, release: 25, api: "1.21" }
|
|
- { mc: "26.2", coordinate: "io.papermc.paper:paper-api:26.2.build.97-stable", java: 25, release: 25, api: "1.21" }
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: ${{ matrix.java }}
|
|
- name: Build jar (mc ${{ matrix.mc }})
|
|
run: >
|
|
./gradlew --no-daemon shadowJar
|
|
-PmcVersion=${{ matrix.mc }}
|
|
-PapiCoordinate='${{ matrix.coordinate }}'
|
|
-PjavaRelease=${{ matrix.release }}
|
|
-PapiVersion=${{ matrix.api }}
|
|
- name: Upload jar
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: LoParkour-${{ matrix.mc }}
|
|
path: build/libs/LoParkour-*.jar
|
|
|
|
# Full quality gate (checkstyle + PMD + tests) on the default build.
|
|
quality:
|
|
name: Quality gate (default 1.20.4)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 21
|
|
- name: Full build
|
|
run: ./gradlew --no-daemon build
|
|
- name: Upload default jar
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: LoParkour-default-1.20.4
|
|
path: build/libs/LoParkour-*.jar
|