Update to 1.17.1

This is mostly buildscript, because the mod itself works fine on 1.17.1 and 1.18 snapshots with no changes. HOWEVER, this moves to the new Mod Menu and AutoConfig packages, and no longer bundles Cloth Config (it's a massive dependency and requires updates like this when they shouldn't be needed).
This commit is contained in:
Emma Waffle
2021-09-29 18:54:33 -04:00
parent 2a2bc75615
commit 38a02f0f06
5 changed files with 28 additions and 39 deletions

View File

@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.5-SNAPSHOT'
id 'fabric-loom' version '0.9.+'
id 'maven-publish'
}
@@ -14,41 +14,32 @@ minecraft {
}
repositories {
maven { url "https://jitpack.io" }
maven { url "https://maven.terraformersmc.com" }
maven { url "https://maven.shedaniel.me" }
}
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"
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation ("me.sargunvohra.mcmods:autoconfig1u:${project.auto_config_version}"){
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation ("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}"){
exclude module: "fabric-api"
}
modImplementation ("me.shedaniel.cloth:config-2:${project.cloth_config_version}"){
modImplementation ("com.terraformersmc:modmenu:${project.mod_menu_version}"){
exclude module: "fabric-api"
}
modImplementation ("io.github.prospector:modmenu:${project.mod_menu_version}"){
exclude module: "fabric-api"
}
include "me.sargunvohra.mcmods:autoconfig1u:${project.auto_config_version}"
include "me.shedaniel.cloth:config-2:${project.cloth_config_version}"
}
processResources {
inputs.property "version", project.version
from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
filesMatching("fabric.mod.json") {
expand "version": project.version
}
from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
}
// ensure that the encoding is set to UTF-8, no matter what the system default is
@@ -61,9 +52,8 @@ tasks.withType(JavaCompile) {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
java {
withSourcesJar()
}
jar {