Update Gradle and Loom #258
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Gradle build | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get cache key | |
id: cache_key | |
run: echo "gradle_key=gradle-`cat versions/mainProject`" >> $GITHUB_OUTPUT | |
- name: Cache Gradle stuff | |
uses: actions/cache@v4 | |
with: | |
key: ${{ steps.cache_key.outputs.gradle_key }}-${{ hashFiles('*.gradle.kts', 'gradle.properties', 'gradle/**') }} | |
restore-keys: ${{ steps.cache_key.outputs.gradle_key }}- | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
.gradle/loom-cache | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: zulu | |
- name: Build with Gradle | |
run: ./gradlew build --stacktrace | |
- name: Capture build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: versions/*/build/libs/ |