From 2ffa852c929fe77895368fedd74a5c9098f72ca3 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 22 Mar 2024 20:48:31 +0100 Subject: [PATCH] Update build dependencies --- .github/workflows/gradle.yml | 2 +- .github/workflows/publish.yml | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- universal/build.gradle.kts | 38 +++++++++++------------- 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 9fdd6a33..3c890d8e 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -12,7 +12,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - name: Validate Gradle Wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/wrapper-validation-action@v2 - name: Set up JDK 17 uses: actions/setup-java@v4 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7b3bdd78..47be01bb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: gradle/wrapper-validation-action@v1 + - uses: gradle/wrapper-validation-action@v2 - name: Set up JDK 17 uses: actions/setup-java@v4 with: diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1af9e093..b82aa23a 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.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/universal/build.gradle.kts b/universal/build.gradle.kts index bad97b70..234e3f29 100644 --- a/universal/build.gradle.kts +++ b/universal/build.gradle.kts @@ -1,7 +1,5 @@ -import io.papermc.hangarpublishplugin.model.Platforms - plugins { - id("io.papermc.hangar-publish-plugin") version "0.1.0" + id("io.papermc.hangar-publish-plugin") version "0.1.2" id("com.modrinth.minotaur") version "2.+" } @@ -65,36 +63,36 @@ if (!isRelease || isMainBranch) { // Only publish releases from the main branch hangarPublish { publications.register("plugin") { - version.set(suffixedVersion) - id.set("ViaBackwards") - channel.set(if (isRelease) "Release" else if (isMainBranch) "Snapshot" else "Alpha") - changelog.set(changelogContent) - apiKey.set(System.getenv("HANGAR_TOKEN")) + version = suffixedVersion + id = "ViaBackwards" + channel = if (isRelease) "Release" else if (isMainBranch) "Snapshot" else "Alpha" + changelog = changelogContent + apiKey = System.getenv("HANGAR_TOKEN") platforms { - register(Platforms.PAPER) { - jar.set(tasks.shadowJar.flatMap { it.archiveFile }) - platformVersions.set(listOf(property("mcVersionRange") as String)) + paper { + jar = tasks.shadowJar.flatMap { it.archiveFile } + platformVersions = listOf(property("mcVersionRange") as String) dependencies { hangar("ViaVersion") { - required.set(true) + required = true } } } - register(Platforms.VELOCITY) { - jar.set(tasks.shadowJar.flatMap { it.archiveFile }) - platformVersions.set(listOf(property("velocityVersion") as String)) + velocity { + jar = tasks.shadowJar.flatMap { it.archiveFile } + platformVersions = listOf(property("velocityVersion") as String) dependencies { hangar("ViaVersion") { - required.set(true) + required = true } } } - register(Platforms.WATERFALL) { - jar.set(tasks.shadowJar.flatMap { it.archiveFile }) - platformVersions.set(listOf(property("waterfallVersion") as String)) + waterfall { + jar = tasks.shadowJar.flatMap { it.archiveFile } + platformVersions = listOf(property("waterfallVersion") as String) dependencies { hangar("ViaVersion") { - required.set(true) + required = true } } }