plugins { id 'fabric-loom' version '1.9.2' id 'maven-publish' } sourceCompatibility = "21" targetCompatibility = "21" archivesBaseName = project.archives_base_name version = project.mod_version group = project.maven_group repositories { maven { name = "CottonMC" url = "https://server.bbkr.space/artifactory/libs-release" } jcenter() } 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" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" // Fabric API. This is technically optional, but you probably want it anyway. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" // Serialization implementation group: 'com.alibaba', name: 'fastjson', version: '1.2.56' implementation 'com.googlecode.json-simple:json-simple:1.1.1' implementation 'com.cedarsoftware:json-io:4.10.1' implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1' // includes include 'com.alibaba:fastjson:1.2.56' include 'com.googlecode.json-simple:json-simple:1.1.1' include 'com.cedarsoftware:json-io:4.10.1' // include files("libs/LibGui-12.0.1+1.21.2.jar") // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs. // You may need to force-disable transitiveness on them. modImplementation files("libs/LibGui-12.0.1+1.21.2.jar") } processResources { inputs.property "version", project.version filesMatching("fabric.mod.json") { expand "version": project.version } } // 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 tasks.withType(JavaCompile) { options.encoding = "UTF-8" } // 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) { archiveClassifier = "sources" from sourceSets.main.allSource } jar { from "LICENSE" } // configure the maven publication publishing { publications { mavenJava(MavenPublication) { // add all the jars that should be included when publishing to maven artifact(remapJar) { builtBy remapJar } artifact(sourcesJar) { builtBy remapSourcesJar } } } }