diff options
-rw-r--r-- | forge/build.gradle.kts (renamed from forge/build.gradle) | 24 | ||||
-rw-r--r-- | forge/src/main/java/de/hype/bbsentials/forge/communication/BBsentialConnection.java | 2 | ||||
-rw-r--r-- | settings.gradle | 30 | ||||
-rw-r--r-- | settings.gradle.kts | 28 |
4 files changed, 45 insertions, 39 deletions
diff --git a/forge/build.gradle b/forge/build.gradle.kts index 2b7af90..6f42b2c 100644 --- a/forge/build.gradle +++ b/forge/build.gradle.kts @@ -1,12 +1,19 @@ plugins { - id("idea") - id("java") + idea + java id("gg.essential.loom") version "0.10.0.+" id("dev.architectury.architectury-pack200") version "0.1.3" id("com.github.johnrengelman.shadow") version "8.1.1" - id("com.bnorm.power.kotlin-power-assert") version "0.13.0" } +//Constants: + +val baseGroup: String by project +val mcVersion: String by project +val version: String by project +val mixinGroup = "$baseGroup.mixin" +val modid: String by project + // Toolchains: java { toolchain.languageVersion.set(JavaLanguageVersion.of(8)) @@ -27,11 +34,11 @@ loom { forge { pack200Provider.set(dev.architectury.pack200.java.Pack200Adapter()) // If you don't want mixins, remove this lines - mixinConfig("mixins.bbsentials.json") + mixinConfig("mixins.$modid.json") } // If you don't want mixins, remove these lines mixin { - defaultRefmapName.set("mixins.bbsentials.refmap.json") + defaultRefmapName.set("mixins.$modid.refmap.json") } } @@ -94,10 +101,8 @@ tasks.processResources { filesMatching(listOf("mcmod.info", "mixins.$modid.json")) { expand(inputs.properties) - rename { fileName -> - fileName.replaceAll("(.+_at.cfg)", "META-INF/" + fileName) - } } + rename("(.+_at.cfg)", "META-INF/$1") } @@ -121,6 +126,9 @@ tasks.shadowJar { println("Copying jars into mod: ${it.files}") } } + + // If you want to include other dependencies and shadow them, you can relocate them in here + fun relocate(name: String) = relocate(name, "$baseGroup.deps.$name") } tasks.assemble.get().dependsOn(tasks.remapJar) diff --git a/forge/src/main/java/de/hype/bbsentials/forge/communication/BBsentialConnection.java b/forge/src/main/java/de/hype/bbsentials/forge/communication/BBsentialConnection.java index 94ab673..f7e4260 100644 --- a/forge/src/main/java/de/hype/bbsentials/forge/communication/BBsentialConnection.java +++ b/forge/src/main/java/de/hype/bbsentials/forge/communication/BBsentialConnection.java @@ -274,7 +274,7 @@ public class BBsentialConnection { throw new RuntimeException(arguments[1]); } else if (arguments[0].equals("hub")) { -//TODO BBsentials.config.sender.addHiddenSendTask("/hub", 1); + BBsentials.config.sender.addHiddenSendTask("/hub", 1); } } if (BBsentials.getConfig().isDetailedDevModeEnabled()) { diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 321db47..0000000 --- a/settings.gradle +++ /dev/null @@ -1,30 +0,0 @@ -pluginManagement { - repositories { - mavenCentral() - gradlePluginPortal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots' - } - maven { - url 'https://maven.architectury.dev/' - } - maven { url 'https://maven.fabricmc.net'} - maven { url 'https://maven.minecraftforge.net/'} - maven { url 'https://repo.spongepowered.org/maven/'} - maven { url 'https://repo.sk1er.club/repository/maven-releases/'} - gradlePluginPortal() - } - resolutionStrategy { - eachPlugin { - if (requested.id.id == "gg.essential.loom") { - useModule("gg.essential:architectury-loom:" + requested.version) - } - } - } - -} - -plugins { - id("org.gradle.toolchains.foojay-resolver-convention") version("0.6.0") -} -include(":common", ":fabric",":forge") diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..a7c9e4c --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,28 @@ +pluginManagement { + repositories { + mavenCentral() + gradlePluginPortal() + maven("https://oss.sonatype.org/content/repositories/snapshots") + maven("https://maven.architectury.dev/") + maven("https://maven.fabricmc.net") + maven("https://maven.minecraftforge.net/") + maven("https://repo.spongepowered.org/maven/") + maven("https://repo.sk1er.club/repository/maven-releases/") + } + resolutionStrategy { + eachPlugin { + when (requested.id.id) { + "gg.essential.loom" -> useModule("gg.essential:architectury-loom:${requested.version}") + } + } + } +} + +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version("0.6.0") +} + + +rootProject.name = "BBsentials All" + +include(":common", ":fabric", ":forge") |