diff --git a/.gitignore b/.gitignore index 09cd281..3b25af4 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ bin/ # fabric run/ +remappedSrc/ \ No newline at end of file diff --git a/build.gradle b/build.gradle index 251e1d5..110f059 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,10 @@ plugins { - id 'fabric-loom' version '0.8-SNAPSHOT' + id 'fabric-loom' version '0.11-SNAPSHOT' id 'maven-publish' } -sourceCompatibility = JavaVersion.VERSION_16 -targetCompatibility = JavaVersion.VERSION_16 +sourceCompatibility = JavaVersion.VERSION_17 +targetCompatibility = JavaVersion.VERSION_17 archivesBaseName = project.archives_base_name version = project.mod_version @@ -19,13 +19,9 @@ repositories { // Loom adds the essential maven repositories to download Minecraft and libraries from automatically. // See https://docs.gradle.org/current/userguide/declaring_repositories.html // for more information about repositories. -// maven { -// name = "ModMenu" -// url = "https://maven.terraformersmc.com/releases/" -// } -// maven { url "https://maven.shedaniel.me/" } + maven { url "https://maven.fabricmc.net/" } - maven { url "https://maven.shedaniel.me/" } + maven { url "https://maven.shedaniel.me/" } // Cloth Config maven { name = "ModMenu" url = "https://maven.terraformersmc.com/releases/" @@ -42,13 +38,12 @@ dependencies { modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" // Cloth Config - modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { + modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { exclude(group: "net.fabricmc.fabric-api") } // Modmenu -// modCompile ("io.github.prospector:modmenu:${project.mod_menu_version}") { - modCompileOnly modRuntime("com.terraformersmc:modmenu:${project.mod_menu_version}"),{ + modApi("com.terraformersmc:modmenu:${project.mod_menu_version}"),{ exclude(group: "net.fabricmc.fabric-api") } @@ -65,11 +60,8 @@ processResources { } tasks.withType(JavaCompile).configureEach { - // ensure that the encoding is set to UTF-8, no matter what the system default is - // this fixes some edge cases with special characters not displaying correctly - // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html - // If Javadoc is generated, this must be specified in that task too. - it.options.encoding = "UTF-8" + // Minecraft 1.18 (1.18-pre2) upwards uses Java 17. + it.options.release = 17 } java { @@ -89,21 +81,15 @@ jar { publishing { publications { mavenJava(MavenPublication) { - // add all the jars that should be included when publishing to maven - artifact(remapJar) { - builtBy remapJar - } - artifact(sourcesJar) { - builtBy remapSourcesJar - } + from components.java } } - - // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. - repositories { - // Add repositories to publish to here. - // Notice: This block does NOT have the same function as the block in the top level. - // The repositories here will be used for publishing your artifact, not for - // retrieving dependencies. - } + + // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. + repositories { + // Add repositories to publish to here. + // Notice: This block does NOT have the same function as the block in the top level. + // The repositories here will be used for publishing your artifact, not for + // retrieving dependencies. + } } diff --git a/gradle.properties b/gradle.properties index 6743c42..9b040b5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,20 +2,19 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties - # check these on https://fabricmc.net/use - minecraft_version=1.17.1 - yarn_mappings=1.17.1+build.61 - loader_version=0.11.7 + # check these on https://fabricmc.net/develop + minecraft_version=1.18.2 + yarn_mappings=1.18.2+build.2 + loader_version=0.13.3 # Mod Properties - mod_version = 1.1.1 + mod_version = 1.1.2 maven_group = net.chatsounds archives_base_name = chatsounds # 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.40.0+1.17 + fabric_version=0.48.0+1.18.2 - mod_menu_version=2.0.5 - cloth_config_version=5.0.38 + mod_menu_version=3.1.0 + cloth_config_version=6.2.57 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a2..d25890b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Tue Mar 22 12:53:43 PDT 2022 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/resources/chatsounds.mixins.json b/src/main/resources/chatsounds.mixins.json index 8efe983..c019d30 100644 --- a/src/main/resources/chatsounds.mixins.json +++ b/src/main/resources/chatsounds.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.chatsounds.mixin", - "compatibilityLevel": "JAVA_8", + "compatibilityLevel": "JAVA_17", "mixins": [ ], "client": [ diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index d5c9a1e..8af7874 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "chatsounds", - "version": "1.1.1", + "version": "1.1.2", "name": "Chat Sounds", "description": "Plays a sound whenever a chat message is received.", @@ -28,14 +28,14 @@ }, "mixins": [ "chatsounds.mixins.json" - ], "depends": { - "fabricloader": ">=0.8.2", - "fabric": ">=0.36", - "minecraft": "1.17.1", - "modmenu": ">=2.0.0", - "cloth-config2": ">=5.0.0" + "fabricloader": ">=0.13.3", + "fabric": "*", + "minecraft": "1.18.x", + "java": ">=17", + "modmenu": ">=3.1.0", + "cloth-config2": ">=6.2.57" }, "conflicts": { "replaymod": "*"