···11plugins {
22- id 'fabric-loom' version '0.9-SNAPSHOT'
22+ id 'fabric-loom' version '0.12-SNAPSHOT'
33 id 'maven-publish'
44}
55···77targetCompatibility = JavaVersion.VERSION_17
8899archivesBaseName = project.archives_base_name
1010-version = project.minecraft_version + "-" + project.mod_version
1010+version = project.mod_version
1111group = project.maven_group
12121313repositories {
···2525 modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
26262727 // Fabric API. This is technically optional, but you probably want it anyway.
2828-// modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
2828+ modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
29293030- // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
3131- // You may need to force-disable transitiveness on them.
3030+ // Uncomment the following line to enable the deprecated Fabric API modules.
3131+ // These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time.
3232+3333+ // modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
3234}
33353436processResources {
···4042}
41434244tasks.withType(JavaCompile).configureEach {
4343- // ensure that the encoding is set to UTF-8, no matter what the system default is
4444- // this fixes some edge cases with special characters not displaying correctly
4545- // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
4646- // If Javadoc is generated, this must be specified in that task too.
4747- it.options.encoding = "UTF-8"
4848-4949- // Minecraft 1.18 (1.18-pre2) upwards uses Java 16.
4545+ // Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
5046 it.options.release = 17
5147}
5248···6763publishing {
6864 publications {
6965 mavenJava(MavenPublication) {
7070- // add all the jars that should be included when publishing to maven
7171- artifact(remapJar) {
7272- builtBy remapJar
7373- }
7474- artifact(sourcesJar) {
7575- builtBy remapSourcesJar
7676- }
6666+ from components.java
7767 }
7868 }
7969