Merge branch 'fix/gh-action'

This commit is contained in:
Lukas Rieger (Blue) 2023-09-27 23:49:27 +02:00
commit a665fb377d
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
3 changed files with 20 additions and 22 deletions

View File

@ -19,18 +19,15 @@ jobs:
with:
submodules: recursive
fetch-depth: 0 # needed for versioning
- name: Set up JDK 1.17
uses: actions/setup-java@v1
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: 17
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: "${{ runner.os }}-bluemap-${{ hashFiles('**/*.gradle*') }}"
restore-keys: |
${{ runner.os }}-bluemap-
distribution: 'temurin'
java-version: |
11
16
17
cache: 'gradle'
- name: Build with Gradle
run: ./gradlew clean spotlessCheck test build
- uses: actions/upload-artifact@v2

View File

@ -11,18 +11,15 @@ jobs:
with:
submodules: recursive
fetch-depth: 0 # needed for versioning
- name: Set up JDK 1.17
uses: actions/setup-java@v1
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: 17
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: "${{ runner.os }}-bluemap-${{ hashFiles('**/*.gradle*') }}"
restore-keys: |
${{ runner.os }}-bluemap-
distribution: 'temurin'
java-version: |
11
16
17
cache: 'gradle'
- name: Build with Gradle
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}

View File

@ -29,6 +29,10 @@ def javaTarget = 16
java {
sourceCompatibility = JavaVersion.toVersion(javaTarget)
targetCompatibility = JavaVersion.toVersion(javaTarget)
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
minecraft {