diff options
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 98 |
1 files changed, 63 insertions, 35 deletions
diff --git a/build.gradle b/build.gradle index 7f7f191..aec5b5f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,43 +1,74 @@ plugins { - id 'fabric-loom' version '0.10-SNAPSHOT' + id 'fabric-loom' version '0.11-SNAPSHOT' apply false + id 'io.shcm.shsupercm.fabric.fletchingtable' version '1.4' apply false } version = project.mod_version + "+" + project.minecraft_version group = project.maven_group -repositories { - maven { url "https://maven.shedaniel.me/" } - maven { url "https://maven.terraformersmc.com/releases" } - maven { url "https://cursemaven.com" } -} +allprojects { + apply plugin: "fabric-loom" + apply plugin: "io.shcm.shsupercm.fabric.fletchingtable" -dependencies { - // To change the versions see the gradle.properties file - minecraft "com.mojang:minecraft:${project.minecraft_version}" - mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" - modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + repositories { + maven { url "https://maven.shedaniel.me/" } + maven { url "https://maven.terraformersmc.com/releases" } + maven { url "https://cursemaven.com" } + } + + dependencies { + minecraft "com.mojang:minecraft:${project.minecraft_version}" + mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" + modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + + modImplementation fabricApi.module("fabric-api-base", "${project.fabric_api}") + modImplementation fabricApi.module("fabric-resource-loader-v0", "${project.fabric_api}") + modImplementation fabricApi.module("fabric-command-api-v1", "${project.fabric_api}") - modImplementation fabricApi.module("fabric-api-base", "${project.fabric_api}") - modImplementation fabricApi.module("fabric-resource-loader-v0", "${project.fabric_api}") - modImplementation fabricApi.module("fabric-command-api-v1", "${project.fabric_api}") + modCompileOnly("com.terraformersmc:modmenu:${project.modmenu}") { + exclude(group: "net.fabricmc.fabric-api") + } - modCompileOnly("com.terraformersmc:modmenu:${project.modmenu}") { - exclude(group: "net.fabricmc.fabric-api") + modCompileOnly("me.shedaniel.cloth:cloth-config-fabric:${project.cloth}") { + exclude(group: "net.fabricmc.fabric-api") + } + + //modCompileOnly("curse.maven:cosmeticarmor-436659:${project.cosmetic_armor}") + + + //fletchingTable.shutUpDrasil18() } - modCompileOnly("me.shedaniel.cloth:cloth-config-fabric:${project.cloth}") { - exclude(group: "net.fabricmc.fabric-api") + fletchingTable { + defaultMixinEnvironment = "auto" } - modCompileOnly("curse.maven:cosmeticarmor-436659:${project.cosmetic_armor}") -} + processResources { + inputs.property "version", rootProject.version + filteringCharset "UTF-8" + + filesMatching("fabric.mod.json") { + expand "version": rootProject.version + } + } + + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + + java { + archivesBaseName = project.archives_base_name + } + + jar { + archiveClassifier.set "dev" -processResources { - inputs.property "version", project.version - filteringCharset "UTF-8" + from("LICENSE") { + rename { "${it}_${project.archivesBaseName}" } + } + } - filesMatching("fabric.mod.json") { - expand "version": project.version + loom { + shareCaches() } } @@ -45,19 +76,16 @@ loom { accessWidenerPath = file("src/main/resources/citresewn.accesswidener") } -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 +dependencies { + afterEvaluate { + include project("defaults:") + } +} java { - archivesBaseName = project.archives_base_name - // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task - // if it is present. - // If you remove this line, sources will not be generated. withSourcesJar() } -jar { - from("LICENSE") { - rename { "${it}_${project.archivesBaseName}" } - } +sourcesJar { + from project("defaults:").sourceSets.main.java.srcDirs }
\ No newline at end of file |