11plugins {
2- id ' fml-loom' version ' 0.1.local '
2+ id ' fml-loom' version " ${ loom_version } "
33 id ' maven-publish'
44}
55
@@ -11,35 +11,48 @@ base {
1111}
1212
1313repositories {
14- mavenLocal()
14+ // Add repositories to retrieve artifacts from in here.
15+ // You should only use this when depending on other mods because
16+ // Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
17+ // See https://docs.gradle.org/current/userguide/declaring_repositories.html
18+ // for more information about repositories.
19+ mavenLocal() // for local files
1520 maven {
1621 name = " Spongepowered"
1722 url = " https://repo.spongepowered.org/repository/maven-public/"
1823 }
1924}
2025
2126loom {
22- accessWidenerPath = file(" src/main/resources/hellofml .accesswidener" )
27+ accessWidenerPath = file(" src/main/resources/modid .accesswidener" )
2328 mergedMinecraftJar()
24- setFML(new File (" libs\\ FishModLoader-v3.4.1.jar" ))
29+ // latest fishmodloader https://github.com/MinecraftIsTooEasy/FishModLoader/releases/latest
30+ setFML(new File (" libs\\ FishModLoader-v${ loader_version} .jar" ))
2531 mods {
26- " HelloFML " {
32+ " modid " {
2733 sourceSet sourceSets. main
34+ // sourceSet sourceSets.client
35+ // sourceSet sourceSets.server
36+ // For modules in the ’src‘ directory, only the main module is required by default
2837 }
2938 }
3039
3140}
3241
3342runClient {
34- args(" --username" , " Tesseract " , " --session" , " a.a.a.a" , " --width" , 854 , " --height" , 480 )
43+ args(" --username" , " ${ user_name } " , " --session" , " a.a.a.a" , " --width" , " ${ window_width } " , " --height" , " ${ window_height } " )
3544}
3645
3746dependencies {
47+ // To change the versions see the gradle.properties file
3848 minecraft " com.mojang:minecraft:${ project.minecraft_version} "
3949 mappings loom. fmlMCPMappings()
40- modImplementation " net.fabricmc:fabric-loader:${ project.loader_version} "
41-
4250 implementation files(loom. getFML(). toPath())
51+ implementation(" it.unimi.dsi:fastutil:8.5.12" )
52+ implementation(" com.google.code.gson:gson:2.11.0" )
53+
54+ // Rusted_Iron_Core API. This is technically optional, but you probably want it anyway.
55+ implementation files(" libs\\ RustedIronCore-${ rusted_iron_core_version} .jar" )
4356}
4457
4558processResources {
@@ -55,24 +68,33 @@ tasks.withType(JavaCompile).configureEach {
5568}
5669
5770java {
71+ // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
72+ // if it is present.
73+ // If you remove this line, sources will not be generated.
5874 withSourcesJar()
5975
6076 sourceCompatibility = JavaVersion . VERSION_17
6177 targetCompatibility = JavaVersion . VERSION_17
6278}
6379
6480jar {
81+ inputs. property " archivesName" , project. base. archivesName
6582
83+ from(" LICENSE" ) {
84+ rename { " ${ it} _${ inputs.properties.archivesName} " }
85+ }
6686}
6787
6888// configure the maven publication
6989publishing {
7090 publications {
7191 mavenJava(MavenPublication ) {
92+ artifactId = project. archives_base_name
7293 from components. java
7394 }
7495 }
7596
97+ // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
7698 repositories {
7799 // Add repositories to publish to here.
78100 // Notice: This block does NOT have the same function as the block in the top level.
0 commit comments