diff options
author | ThatGravyBoat <thatgravyboat@gmail.com> | 2024-09-23 02:51:37 -0230 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 07:21:37 +0200 |
commit | 8f7b79a0b4953bb64f342ccc21d962c8aacbc169 (patch) | |
tree | cd26dc00f4009b990e30b5f3aaef125fb5663d06 | |
parent | 4b34113c86f824000bbe9eebb5cc3fcdfe56b9ba (diff) | |
download | skyhanni-8f7b79a0b4953bb64f342ccc21d962c8aacbc169.tar.gz skyhanni-8f7b79a0b4953bb64f342ccc21d962c8aacbc169.tar.bz2 skyhanni-8f7b79a0b4953bb64f342ccc21d962c8aacbc169.zip |
Backend: Add blossom and make source checker show version again (#2558)
-rw-r--r-- | build.gradle.kts | 7 | ||||
-rw-r--r-- | root.gradle.kts | 1 | ||||
-rw-r--r-- | settings.gradle.kts | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/tweaker/DownloadSourceChecker.java | 5 |
5 files changed, 12 insertions, 4 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index e8464ada2..447387f86 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,6 +18,7 @@ plugins { kotlin("plugin.power-assert") `maven-publish` id("moe.nea.shot") version "1.0.0" + id("net.kyori.blossom") } val target = ProjectTarget.values().find { it.projectPath == project.path }!! @@ -312,12 +313,18 @@ if (!MultiVersionStage.activeState.shouldCompile(target)) { onlyIf { false } } } + preprocess { vars.put("MC", target.minecraftVersion.versionNumber) vars.put("FORGE", if (target.forgeDep != null) 1 else 0) vars.put("JAVA", target.minecraftVersion.javaVersion) patternAnnotation.set("at.hannibal2.skyhanni.utils.compat.Pattern") } + +blossom { + replaceToken("@MOD_VERSION@", version) +} + val sourcesJar by tasks.creating(Jar::class) { destinationDirectory.set(layout.buildDirectory.dir("badjars")) archiveClassifier.set("src") diff --git a/root.gradle.kts b/root.gradle.kts index 84a371098..627d155ee 100644 --- a/root.gradle.kts +++ b/root.gradle.kts @@ -3,6 +3,7 @@ import com.replaymod.gradle.preprocess.Node plugins { id("dev.deftu.gradle.preprocess") version "0.6.1" + id("net.kyori.blossom") version "1.3.2" apply false id("gg.essential.loom") version "1.6.+" apply false kotlin("jvm") version "2.0.0" apply false kotlin("plugin.power-assert") version "2.0.0" apply false diff --git a/settings.gradle.kts b/settings.gradle.kts index aaf0f02cf..adee2acba 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -14,6 +14,7 @@ pluginManagement { maven("https://repo.nea.moe/releases") maven("https://repo.sk1er.club/repository/maven-releases/") maven("https://maven.deftu.dev/releases") + maven("https://maven.teamresourceful.com/repository/maven-private/") // Blossom maven("https://jitpack.io") { content { includeGroupByRegex("(com|io)\\.github\\..*") diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 35f083580..45d02f544 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -42,7 +42,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.27.Beta.11", + version = "@MOD_VERSION@", ) class SkyHanniMod { diff --git a/src/main/java/at/hannibal2/skyhanni/tweaker/DownloadSourceChecker.java b/src/main/java/at/hannibal2/skyhanni/tweaker/DownloadSourceChecker.java index 5672ee87c..63a92849b 100644 --- a/src/main/java/at/hannibal2/skyhanni/tweaker/DownloadSourceChecker.java +++ b/src/main/java/at/hannibal2/skyhanni/tweaker/DownloadSourceChecker.java @@ -14,6 +14,7 @@ import java.util.concurrent.atomic.AtomicBoolean; public class DownloadSourceChecker { + private static final String MOD_VERSION = "@MOD_VERSION@"; private static final String GITHUB_REPO = "511310721"; private static final String GITHUB_REPO_TEXT = "repo_id=" + GITHUB_REPO; private static final String MODRINTH_URL = "/data/byNkmv5G/"; @@ -95,12 +96,10 @@ public class DownloadSourceChecker { } )); - // TODO FIX THIS CAUSING CLASS LOADING AND CRASHING - //String version = SkyHanniMod.Companion.getVersion(); JOptionPane.showOptionDialog( frame, String.format(String.join("\n", SECURITY_POPUP), uriToSimpleString(host)), - "SkyHanni Security Error", + "SkyHanni " + MOD_VERSION + " Security Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE, null, |