diff options
-rw-r--r-- | forge/build.gradle.kts | 60 | ||||
-rw-r--r-- | forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java | 1 | ||||
-rw-r--r-- | settings.gradle.kts | 1 |
3 files changed, 32 insertions, 30 deletions
diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index f222c1d..ea9d613 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -19,31 +19,6 @@ java { toolchain.languageVersion.set(JavaLanguageVersion.of(8)) withSourcesJar() } - -// Minecraft configuration: -loom { - log4jConfigs.from(file("log4j2.xml")) - launchConfigs { - "client" { - // If you don't want mixins, remove these lines - property("mixin.debug", "true") - property("asmhelper.verbose", "true") - arg("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker") - arg("--mixin", "mixins.$modid.json") - } - } - forge { - pack200Provider.set(dev.architectury.pack200.java.Pack200Adapter()) - // If you don't want mixins, remove this lines - mixinConfig("mixins.$modid.json") - } - // If you don't want mixins, remove these lines - mixin { - defaultRefmapName.set("mixins.$modid.refmap.json") - } -} - - // Dependencies: repositories { @@ -54,11 +29,17 @@ repositories { maven("https://maven.notenoughupdates.org/releases/") } +val devenvMod by configurations.creating { + isTransitive = false + isVisible = false +} val shadowImpl: Configuration by configurations.creating { configurations.implementation.get().extendsFrom(this) } + +// Minecraft configuration: dependencies { implementation(project(":common")) minecraft("com.mojang:minecraft:1.8.9") @@ -72,12 +53,36 @@ dependencies { shadowImpl("org.notenoughupdates.moulconfig:MoulConfig:1.3.0") // testMod("org.notenoughupdates.moulconfig:MoulConfig:1.3.0:test") annotationProcessor("org.spongepowered:mixin:0.8.5-SNAPSHOT") - + "devenvMod"("org.notenoughupdates.moulconfig:MoulConfig:1.3.0:test") // If you don't want to log in with your real minecraft account, remove this line runtimeOnly("me.djtheredstoner:DevAuth-forge-legacy:1.1.2") } +loom { + log4jConfigs.from(file("log4j2.xml")) + launchConfigs { + "client" { + // If you don't want mixins, remove these lines + property("mixin.debug", "true") + property("asmhelper.verbose", "true") + arg("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker") + arg("--mixin", "mixins.$modid.json") + arg("--mods", devenvMod.resolve().joinToString(",") { it.relativeTo(file("run")).path }) + } + } + + forge { + pack200Provider.set(dev.architectury.pack200.java.Pack200Adapter()) + // If you don't want mixins, remove this lines + mixinConfig("mixins.$modid.json") + } + // If you don't want mixins, remove these lines + mixin { + defaultRefmapName.set("mixins.$modid.refmap.json") + } +} + // Tasks: tasks.withType(JavaCompile::class) { @@ -144,7 +149,4 @@ sourceSets { } } } - - - tasks.assemble.get().dependsOn(tasks.remapJar)
\ No newline at end of file diff --git a/forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java b/forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java index 93ecd99..4d50a4e 100644 --- a/forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java +++ b/forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java @@ -35,7 +35,6 @@ public class MoulConfig extends Config { public String getTitle() { return "BBsentials " + de.hype.bbsentials.common.client.Config.apiVersion; } - @Override public void saveNow() { config.save(); diff --git a/settings.gradle.kts b/settings.gradle.kts index 0d862f3..dd6e3ec 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -4,6 +4,7 @@ pluginManagement { gradlePluginPortal() maven("https://oss.sonatype.org/content/repositories/snapshots") maven("https://maven.architectury.dev/") + maven("https://maven.notenoughupdates.org/releases/") maven("https://maven.fabricmc.net") maven("https://maven.minecraftforge.net/") maven("https://repo.spongepowered.org/maven/") |