https://modrinth.com/mod/breakfree

Update to 1.18

+20 -37
+10 -28
build.gradle
··· 1 1 plugins { 2 - id 'fabric-loom' version '0.9-SNAPSHOT' 2 + id 'fabric-loom' version '0.10-SNAPSHOT' 3 3 id 'maven-publish' 4 4 } 5 5 6 + sourceCompatibility = JavaVersion.VERSION_17 7 + targetCompatibility = JavaVersion.VERSION_17 8 + 9 + archivesBaseName = project.archives_base_name 6 10 version = project.mod_version 7 11 group = project.maven_group 8 12 ··· 22 26 23 27 // Fabric API. This is technically optional, but you probably want it anyway. 24 28 modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" 25 - 26 - // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs. 27 - // You may need to force-disable transitiveness on them. 28 29 } 29 30 30 31 processResources { 31 32 inputs.property "version", project.version 32 - filteringCharset "UTF-8" 33 33 34 34 filesMatching("fabric.mod.json") { 35 35 expand "version": project.version 36 36 } 37 37 } 38 38 39 - def targetJavaVersion = 16 40 39 tasks.withType(JavaCompile).configureEach { 41 - // ensure that the encoding is set to UTF-8, no matter what the system default is 42 - // this fixes some edge cases with special characters not displaying correctly 43 - // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html 44 - // If Javadoc is generated, this must be specified in that task too. 45 - it.options.encoding = "UTF-8" 46 - if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) { 47 - it.options.release = targetJavaVersion 48 - } 40 + // Minecraft 1.18 (1.18-pre2) upwards uses Java 17. 41 + it.options.release = 17 49 42 } 50 43 51 44 java { 52 - def javaVersion = JavaVersion.toVersion(targetJavaVersion) 53 - if (JavaVersion.current() < javaVersion) { 54 - toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion) 55 - } 56 - archivesBaseName = project.archives_base_name 57 45 // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task 58 46 // if it is present. 59 47 // If you remove this line, sources will not be generated. ··· 62 50 63 51 jar { 64 52 from("LICENSE") { 65 - rename { "${it}_${project.archivesBaseName}" } 53 + rename { "${it}_${project.archivesBaseName}"} 66 54 } 67 55 } 68 56 ··· 70 58 publishing { 71 59 publications { 72 60 mavenJava(MavenPublication) { 73 - // add all the jars that should be included when publishing to maven 74 - artifact(remapJar) { 75 - builtBy remapJar 76 - } 77 - artifact(sourcesJar) { 78 - builtBy remapSourcesJar 79 - } 61 + from components.java 80 62 } 81 63 } 82 64 ··· 87 69 // The repositories here will be used for publishing your artifact, not for 88 70 // retrieving dependencies. 89 71 } 90 - } 72 + }
+7 -7
gradle.properties
··· 1 1 # Done to increase the memory available to gradle. 2 2 org.gradle.jvmargs=-Xmx1G 3 3 # Fabric Properties 4 - # check these on https://modmuss50.me/fabric.html 5 - minecraft_version=1.17.1 6 - yarn_mappings=1.17.1+build.39 7 - loader_version=0.11.6 4 + # check these on https://fabricmc.net/versions.html 5 + minecraft_version=1.18 6 + yarn_mappings=1.18+build.1 7 + loader_version=0.12.8 8 8 # Mod Properties 9 - mod_version=1.0.0 9 + mod_version=1.0.1 10 10 maven_group=io.gtihub.justapotota 11 11 archives_base_name=breakfree 12 12 # Dependencies 13 - # check this on https://modmuss50.me/fabric.html 14 - fabric_version=0.38.1+1.17 13 + # check this on https://fabricmc.net/versions.html 14 + fabric_version=0.43.1+1.18
+3 -2
src/main/resources/fabric.mod.json
··· 15 15 "breakfree.mixins.json" 16 16 ], 17 17 "depends": { 18 - "fabricloader": ">=0.11.6", 18 + "fabricloader": ">=0.11.3", 19 19 "fabric": "*", 20 - "minecraft": "1.17.1" 20 + "minecraft": "1.18.x", 21 + "java": ">=17" 21 22 } 22 23 }