cursed minecraft packet metadata generation tool
at master 93 lines 2.6 kB view raw
1plugins { 2 id 'fabric-loom' version '1.11-SNAPSHOT' 3 id 'maven-publish' 4 id "org.jetbrains.kotlin.jvm" version "2.2.20" 5} 6 7version = project.mod_version 8group = project.maven_group 9 10base { 11 archivesName = project.archives_base_name 12} 13 14repositories { 15 // Add repositories to retrieve artifacts from in here. 16 // You should only use this when depending on other mods because 17 // Loom adds the essential maven repositories to download Minecraft and libraries from automatically. 18 // See https://docs.gradle.org/current/userguide/declaring_repositories.html 19 // for more information about repositories. 20 21 maven { url "https://gitlab.com/api/v4/projects/18568066/packages/maven" } 22} 23 24fabricApi { 25 configureDataGeneration { 26 client = true 27 } 28} 29 30dependencies { 31 // To change the versions see the gradle.properties file 32 minecraft "com.mojang:minecraft:${project.minecraft_version}" 33 mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" 34 modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" 35 36 // Fabric API. This is technically optional, but you probably want it anyway. 37 modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" 38 modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}" 39 40 implementation "io.github.classgraph:classgraph:4.8.181" 41 implementation "mx.kenzie:overlord:1.0.1" 42} 43 44processResources { 45 inputs.property "version", project.version 46 47 filesMatching("fabric.mod.json") { 48 expand "version": project.version 49 } 50} 51 52tasks.withType(JavaCompile).configureEach { 53 it.options.release = 21 54} 55 56kotlin { 57 jvmToolchain 21 58 explicitApi() 59} 60 61java { 62 // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task 63 // if it is present. 64 // If you remove this line, sources will not be generated. 65 withSourcesJar() 66 67 sourceCompatibility = JavaVersion.VERSION_21 68 targetCompatibility = JavaVersion.VERSION_21 69} 70 71jar { 72 from("LICENSE") { 73 rename { "${it}_${project.base.archivesName.get()}"} 74 } 75} 76 77// configure the maven publication 78publishing { 79 publications { 80 create("mavenJava", MavenPublication) { 81 artifactId = project.archives_base_name 82 from components.java 83 } 84 } 85 86 // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. 87 repositories { 88 // Add repositories to publish to here. 89 // Notice: This block does NOT have the same function as the block in the top level. 90 // The repositories here will be used for publishing your artifact, not for 91 // retrieving dependencies. 92 } 93}