From 4712981d4aa515567cb600e39b1b1236d5fc68bf Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Wed, 28 Feb 2024 21:13:10 +0000 Subject: [PATCH] Add a dummy RFB plugin to allow classes to be used earlier in the loading process --- build.gradle | 5 ----- build.gradle.kts | 12 ++++++++++++ dependencies.gradle | 2 ++ .../com/gtnewhorizon/gtnhlib/core/GTNHLibCore.java | 4 ++-- .../gtnewhorizon/gtnhlib/rfb/GTNHLibRfbPlugin.java | 10 ++++++++++ .../resources/META-INF/rfb-plugin/gtnhlib.properties | 9 +++++++++ 6 files changed, 35 insertions(+), 7 deletions(-) delete mode 100644 build.gradle create mode 100644 build.gradle.kts create mode 100644 src/main/java/com/gtnewhorizon/gtnhlib/rfb/GTNHLibRfbPlugin.java create mode 100644 src/main/resources/META-INF/rfb-plugin/gtnhlib.properties diff --git a/build.gradle b/build.gradle deleted file mode 100644 index e57a16f..0000000 --- a/build.gradle +++ /dev/null @@ -1,5 +0,0 @@ -//version: 1707058017 - -plugins { - id 'com.gtnewhorizons.gtnhconvention' -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..0dc8516 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,12 @@ +//version: 1707058017 + +plugins { + id("com.gtnewhorizons.gtnhconvention") +} + +tasks.processResources { + inputs.property("version", project.version.toString()) + filesMatching("META-INF/rfb-plugin/*") { + expand("version" to project.version.toString()) + } +} diff --git a/dependencies.gradle b/dependencies.gradle index 8f222bd..fe15674 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -12,6 +12,8 @@ dependencies { testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") testRuntimeOnly("org.junit.vintage:junit-vintage-engine") + compileOnly("com.gtnewhorizons.retrofuturabootstrap:RetroFuturaBootstrap:0.4.0") { transitive = false } + compileOnly('org.jetbrains:annotations:24.0.1') compileOnly("org.projectlombok:lombok:1.18.22") {transitive = false } annotationProcessor("org.projectlombok:lombok:1.18.22") diff --git a/src/main/java/com/gtnewhorizon/gtnhlib/core/GTNHLibCore.java b/src/main/java/com/gtnewhorizon/gtnhlib/core/GTNHLibCore.java index ac4b6c6..e894be7 100644 --- a/src/main/java/com/gtnewhorizon/gtnhlib/core/GTNHLibCore.java +++ b/src/main/java/com/gtnewhorizon/gtnhlib/core/GTNHLibCore.java @@ -9,8 +9,8 @@ public class GTNHLibCore implements IFMLLoadingPlugin { /* - * Doesn't currently do anything, other than force the mod to load with coremods so Hodgepodge can use it's - * functions in mixins/asm + * Doesn't currently do anything, other than force the mod to load with coremods so Hodgepodge can use its functions + * in mixins/asm */ @Override public String[] getASMTransformerClass() { diff --git a/src/main/java/com/gtnewhorizon/gtnhlib/rfb/GTNHLibRfbPlugin.java b/src/main/java/com/gtnewhorizon/gtnhlib/rfb/GTNHLibRfbPlugin.java new file mode 100644 index 0000000..929bb5a --- /dev/null +++ b/src/main/java/com/gtnewhorizon/gtnhlib/rfb/GTNHLibRfbPlugin.java @@ -0,0 +1,10 @@ +package com.gtnewhorizon.gtnhlib.rfb; + +import com.gtnewhorizons.retrofuturabootstrap.api.RfbPlugin; + +public class GTNHLibRfbPlugin implements RfbPlugin { + /* + * Doesn't currently do anything, other than force the mod to load with RFB plugins so Angelica can use its + * functions in mixins/asm + */ +} diff --git a/src/main/resources/META-INF/rfb-plugin/gtnhlib.properties b/src/main/resources/META-INF/rfb-plugin/gtnhlib.properties new file mode 100644 index 0000000..ffbb0c0 --- /dev/null +++ b/src/main/resources/META-INF/rfb-plugin/gtnhlib.properties @@ -0,0 +1,9 @@ +name=GTNHLib +version=${version} +additionalVersions= +className=com.gtnewhorizon.gtnhlib.rfb.GTNHLibRfbPlugin +transformerExclusions= +versionConstraints= +loadBefore= +loadAfter= +loadRequires=