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 {

View File

@@ -2,20 +2,19 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.16.4
yarn_mappings=1.16.4+build.7
loader_version=0.10.8
# check these on https://fabricmc.net/versions.html
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.61
loader_version=0.11.7
# Mod Properties
mod_version = 1.0.0
mod_version = 1.0.1
maven_group = eu.midnightdust
archives_base_name = timechanger
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.26.1+1.16
auto_config_version = 3.3.1
cloth_config_version = 4.8.3
mod_menu_version = 1.14.6+build.31
fabric_version=0.40.1+1.17
cloth_config_version = 5.0.38
mod_menu_version = 2.1.1

View File

@@ -1,8 +1,8 @@
package eu.midnightdust.timechanger;
import eu.midnightdust.timechanger.config.TimeChangerConfig;
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
import me.sargunvohra.mcmods.autoconfig1u.serializer.JanksonConfigSerializer;
import me.shedaniel.autoconfig.AutoConfig;
import me.shedaniel.autoconfig.serializer.JanksonConfigSerializer;
import net.fabricmc.api.ClientModInitializer;
public class TimeChangerClient implements ClientModInitializer {

View File

@@ -1,8 +1,8 @@
package eu.midnightdust.timechanger.config;
import io.github.prospector.modmenu.api.ConfigScreenFactory;
import io.github.prospector.modmenu.api.ModMenuApi;
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import me.shedaniel.autoconfig.AutoConfig;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;

View File

@@ -1,8 +1,8 @@
package eu.midnightdust.timechanger.config;
import me.sargunvohra.mcmods.autoconfig1u.ConfigData;
import me.sargunvohra.mcmods.autoconfig1u.annotation.Config;
import me.sargunvohra.mcmods.autoconfig1u.shadowed.blue.endless.jankson.Comment;
import me.shedaniel.autoconfig.ConfigData;
import me.shedaniel.autoconfig.annotation.Config;
import me.shedaniel.cloth.clothconfig.shadowed.blue.endless.jankson.Comment;
import java.util.ArrayList;
import java.util.List;