From 081f109d0d6a17ce21c30c1a2ed780290d802fc0 Mon Sep 17 00:00:00 2001 From: 2No2Name <2no2name@web.de> Date: Fri, 13 Sep 2024 20:52:32 +0200 Subject: [PATCH] Update dependencies (Thanks to CanerKaraca23 https://github.com/CaffeineMC/lithium-fabric/pull/538/files ) --- .github/workflows/gradle.yml | 33 +++++++----- .github/workflows/publish.yml | 57 ++++++++++++--------- .github/workflows/pull_request.yml | 39 ++++++++------ build.gradle | 2 +- components/mixin-config-plugin/build.gradle | 4 +- gradle/java.gradle | 4 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 7 files changed, 81 insertions(+), 60 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 4d31481b6..e211239f5 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,29 +1,36 @@ -name: gradle-ci +name: Build CI on: [ push ] jobs: - build: - runs-on: ubuntu-latest + Build: + runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 21 - uses: actions/setup-java@v2 + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup JDK 21 + uses: actions/setup-java@v4 with: - distribution: 'adopt' + distribution: adopt java-version: 21 - - name: Grant execute permission for gradlew + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: Build with Gradle + + - name: Build with Gradle run: ./gradlew build - - name: run test server + - name: Run Test Server timeout-minutes: 5 run: ./gradlew runAutoTestServer - - name: Upload build artifacts - uses: actions/upload-artifact@v1 + - name: Upload Build Artifacts + uses: actions/upload-artifact@v4 with: name: build-artifacts path: build/libs \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 64a0c6494..78544e204 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,29 +1,36 @@ -name: release-artifacts +name: Release CI on: - release: - types: - - published + release: + types: + - published jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Set up JDK 21 - uses: actions/setup-java@v2 - with: - distribution: 'adopt' - java-version: 21 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Upload assets to CurseForge - run: ./gradlew build - env: - BUILD_RELEASE: ${{ github.event.prerelease == false }} - - name: Upload assets to GitHub - uses: AButler/upload-release-assets@v2.0 - with: - files: 'build/libs/*.jar;!build/libs/*-dev.jar;LICENSE' - repo-token: ${{ secrets.GITHUB_TOKEN }} + Build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup JDK 21 + uses: actions/setup-java@v4 + with: + distribution: adopt + java-version: 21 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Upload assets to CurseForge + run: ./gradlew build + env: + BUILD_RELEASE: ${{ github.event.prerelease == false }} + + - name: Upload assets to GitHub + uses: AButler/upload-release-assets@v3.0 + with: + files: 'build/libs/*.jar;!build/libs/*-dev.jar;LICENSE' + repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index cc943b431..84f32d5f6 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,23 +1,30 @@ -name: gradle-ci +name: PR CI on: [ pull_request ] jobs: - build: + Build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 17 - uses: actions/setup-java@v2 - with: - distribution: 'adopt' - java-version: 17 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew build - - - name: run test server - timeout-minutes: 5 - run: ./gradlew runAutoTestServer \ No newline at end of file + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup JDK 21 + uses: actions/setup-java@v4 + with: + distribution: adopt + java-version: 21 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build with Gradle + run: ./gradlew build + + - name: Run Test Server + timeout-minutes: 5 + run: ./gradlew runAutoTestServer \ No newline at end of file diff --git a/build.gradle b/build.gradle index c21384732..b5a47d0e4 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { // This dependency is only used to determine the state of the Git working tree so that build artifacts can be // more easily identified. TODO: Lazily load GrGit via a service only when builds are performed. - id 'org.ajoberstar.grgit' version '5.0.0' + id 'org.ajoberstar.grgit' version '5.2.2' // Mixin config plugin is a subproject for creating lithium's settings from annotations in each mixin package. id 'net.caffeinemc.mixin-config-plugin' version '1.0-SNAPSHOT' diff --git a/components/mixin-config-plugin/build.gradle b/components/mixin-config-plugin/build.gradle index 8ccb7d7fc..4bac0952a 100644 --- a/components/mixin-config-plugin/build.gradle +++ b/components/mixin-config-plugin/build.gradle @@ -23,8 +23,8 @@ gradlePlugin { } } -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 +sourceCompatibility = JavaVersion.VERSION_21 +targetCompatibility = JavaVersion.VERSION_21 // ensure that the encoding is set to UTF-8, no matter what the system default is // this fixes some edge cases with special characters not displaying correctly diff --git a/gradle/java.gradle b/gradle/java.gradle index 26e31af1b..bba18c876 100644 --- a/gradle/java.gradle +++ b/gradle/java.gradle @@ -1,5 +1,5 @@ -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 +sourceCompatibility = JavaVersion.VERSION_21 +targetCompatibility = JavaVersion.VERSION_21 // ensure that the encoding is set to UTF-8, no matter what the system default is // this fixes some edge cases with special characters not displaying correctly diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a4413138c..0aaefbcaf 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME