plugins { alias libs.plugins.fabric.loom id "io.github.p03w.machete" version "1.+" // automatic jar compressing on build id 'maven-publish' } base { archivesName = project.archives_base_name } String buildNumber = System.getenv("RUN_NUMBER") version = "${mod_version}+${libs.versions.minecraft.get()}" + (buildNumber != null ? "-${buildNumber}" : "") group = project.maven_group repositories { // Add repositories to retrieve artifacts from in here. // You should only use this when depending on other mods because // 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 { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes maven { // Fabric ASM for Porting Lib url = "https://jitpack.io/" content { includeGroupAndSubgroups("com.github") } } maven { url = "https://maven.tterrag.com/" } // Flywheel maven { url = "https://mvn.devos.one/snapshots/" } // Create and several dependencies maven { url = "https://mvn.devos.one/releases/" } // Porting Lib releases maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven" } // Forge Config API Port exclusiveContent { forRepository { maven { name = "Modrinth" url = "https://api.modrinth.com/maven" } } filter { includeGroup "maven.modrinth" } } } // All the dependencies are declared at gradle/libs.version.toml and referenced with "libs." dependencies { minecraft libs.minecraft mappings loom.layered { mappings "org.quiltmc:quilt-mappings:${libs.versions.quilt.mappings.get()}:intermediary-v2" officialMojangMappings() } modImplementation libs.fabric.loader // Fabric API. This is technically optional, but you probably want it anyway. modImplementation libs.fabric.api // Create - dependencies are added transitively modImplementation libs.create // Thin Air modImplementation libs.thinair // Ad Astra modImplementation libs.adastra modImplementation libs.botarium // Development QOL modLocalRuntime libs.lazydfu modLocalRuntime libs.modmenu include(implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:0.4.1"))) } processResources { // require dependencies to be the version compiled against or newer Map properties = [ "version": version, "fabric_loader_version": libs.versions.fabric.loader.get(), "fabric_api_version": libs.versions.fabric.api.get(), "create_version": libs.versions.create.get(), "minecraft_version": libs.versions.minecraft.get() ] inputs.properties(properties) filesMatching("fabric.mod.json") { expand properties } } tasks.withType(JavaCompile).configureEach { it.options.encoding = "UTF-8" it.options.release = 17 } java { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 // withSourcesJar() } jar { from("LICENSE") { rename { "${it}_${base.archivesName.get()}"} } }