56 lines
1.6 KiB
Groovy
Executable File
56 lines
1.6 KiB
Groovy
Executable File
plugins {
|
|
id 'fabric-loom' version '1.6-SNAPSHOT'
|
|
}
|
|
|
|
version = project.mod_version + "+" + project.minecraft_version
|
|
group = project.maven_group
|
|
|
|
dependencies {
|
|
// To change the versions see the gradle.properties file
|
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
|
mappings loom.officialMojangMappings()
|
|
|
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
|
}
|
|
|
|
base {
|
|
archivesName = project.archives_base_name
|
|
}
|
|
|
|
// Custom Manifest and Intermediary mappings declaration
|
|
loom {
|
|
accessWidenerPath = file("src/main/resources/gatoanticheat.accesswidener")
|
|
customMinecraftManifest = "https://gist.githubusercontent.com/rizecookey/4c6142baaccc3875f9b227fe22f2ace5/raw/c8ed74b19f7a5315813c9d4b199798b692a8f359/1.16_combat-6.json"
|
|
intermediaryUrl = "https://maven.rizecookey.net/net/fabricmc/intermediary/%1\$s/intermediary-%1\$s-v2.jar"
|
|
}
|
|
|
|
processResources {
|
|
inputs.property "version", project.version
|
|
filteringCharset "UTF-8"
|
|
|
|
filesMatching("fabric.mod.json") {
|
|
expand "version": project.version
|
|
}
|
|
}
|
|
|
|
def targetJavaVersion = 21
|
|
tasks.withType(JavaCompile).configureEach {
|
|
it.options.encoding = "UTF-8"
|
|
|
|
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
|
|
it.options.release = targetJavaVersion
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
|
|
jar {
|
|
from("LICENSE") {
|
|
rename { "${it}_${project.archivesBaseName}" }
|
|
}
|
|
} |