From 8acba15eb7c9a0c38e21de8d584026cb41b46d6a Mon Sep 17 00:00:00 2001 From: BlayTheNinth <1933180+BlayTheNinth@users.noreply.github.com> Date: Thu, 28 Dec 2023 18:43:36 +0100 Subject: [PATCH] build: Update gradle files based on latest balm-mod template --- build.gradle | 26 ++--------- fabric/build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- repositories.gradle | 59 ++++++++++++++++++++++++ shared/build.gradle | 2 + 5 files changed, 67 insertions(+), 24 deletions(-) create mode 100644 repositories.gradle diff --git a/build.gradle b/build.gradle index 7ba390e..77dde71 100644 --- a/build.gradle +++ b/build.gradle @@ -1,9 +1,9 @@ plugins { - id 'fabric-loom' version '1.2-SNAPSHOT' apply(false) + id 'fabric-loom' version '1.4-SNAPSHOT' apply(false) // id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' apply(false) // this causes ForgeGradle to fail in reobf id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7" // this is required for VanillaGradle and NeoForge to exist in harmony id 'org.spongepowered.mixin' version '0.7-SNAPSHOT' apply(false) - id 'net.darkhax.curseforgegradle' version '1.1.16' apply(false) + id 'net.darkhax.curseforgegradle' version '1.1.18' apply(false) id "com.modrinth.minotaur" version "2.+" apply(false) } @@ -39,29 +39,11 @@ subprojects { repositories { mavenCentral() - maven { - url "https://www.cursemaven.com" - - content { - includeGroup 'curse.maven' - } - } - maven { url "https://maven.twelveiterations.com/repository/maven-public/" } - - // For Cloth Config and REI - maven { url "https://maven.shedaniel.me/" } - - // For JEI - maven { url "https://dvs1.progwml6.com/files/maven/" } - - // For WTHIT - maven { url "https://maven.bai.lol" } - - // For ModMenu - maven { url "https://maven.terraformersmc.com/releases/" } } + apply from: rootProject.file('repositories.gradle') + tasks.withType(JavaCompile).configureEach { it.options.encoding = 'UTF-8' it.options.getRelease().set(java_version.toInteger()) diff --git a/fabric/build.gradle b/fabric/build.gradle index 4257680..d16daa9 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -58,7 +58,7 @@ loom { runDir("build/datagen") vmArg "-Dfabric-api.datagen" - vmArg "-Dfabric-api.datagen.output-dir=${project(":shared").file("src/main/generated")}" + vmArg "-Dfabric-api.datagen.output-dir=${project(":shared").file("src/generated/resources")}" vmArg "-Dfabric-api.datagen.modid=${mod_id}" } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 59bc51a..db9a6b8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/repositories.gradle b/repositories.gradle new file mode 100644 index 0000000..fdf3850 --- /dev/null +++ b/repositories.gradle @@ -0,0 +1,59 @@ +repositories { + maven { + url = "https://www.cursemaven.com" + content { + includeGroup 'curse.maven' + } + } + + maven { + url = "https://maven.shedaniel.me/" + content { + includeGroup "me.shedaniel" + includeGroup "me.shedaniel.cloth" + includeGroup "dev.architectury" + } + } + + maven { + url = "https://maven.blamejared.com" + content { + includeGroup "mezz.jei" + } + } + + maven { + url = "https://maven.bai.lol" + content { + includeGroup "mcp.mobius.waila" + } + } + + maven { + url = "https://maven.terraformersmc.com/releases" + content { + includeGroup "com.terraformersmc" + } + } + + maven { + url = "https://jm.gserv.me/repository/maven-public/" + content { + includeGroup "info.journeymap" + } + } + + maven { + url = 'https://jitpack.io' + content { + includeGroup "com.github.BlueMap-Minecraft" + } + } + + maven { + url = "https://repo.mikeprimm.com/" + content { + includeGroup "us.dynmap" + } + } +} \ No newline at end of file diff --git a/shared/build.gradle b/shared/build.gradle index 44b70b9..deccd5b 100644 --- a/shared/build.gradle +++ b/shared/build.gradle @@ -27,6 +27,8 @@ dependencies { apply from: 'dependencies.gradle' +sourceSets.main.resources.srcDir('src/generated/resources') + publishing { publications { mavenJava(MavenPublication) {