1- import org.gradle.kotlin.dsl.from
2-
31plugins {
2+ `maven- publish`
43 id(" fabric-loom" )
54 id(" me.modmuss50.mod-publish-plugin" )
65}
@@ -9,42 +8,42 @@ version = "${property("mod.version")}+${stonecutter.current.version}"
98base.archivesName = property(" mod.id" ) as String
109
1110repositories {
12- /* *
13- * Restricts dependency search of the given [groups] to the [maven URL][url],
14- * improving the setup speed.
15- */
11+ mavenCentral()
1612 fun strictMaven (url : String , alias : String , vararg groups : String ) = exclusiveContent {
1713 forRepository { maven(url) { name = alias } }
1814 filter { groups.forEach(::includeGroup) }
1915 }
20- strictMaven(" https://www.cursemaven.com" , " CurseForge" , " curse.maven" )
2116 strictMaven(" https://api.modrinth.com/maven" , " Modrinth" , " maven.modrinth" )
22- maven(" https://maven.terraformersmc.com/" )
23- maven(" https://maven.wispforest.io/releases/" )
24- maven(" https://jitpack.io" )
25- maven(" https://repo.hypixel.net/repository/Hypixel/" )
2617 maven(" https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1" )
18+ exclusiveContent {
19+ forRepository {
20+ maven {
21+ url = uri(" https://maven.azureaaron.net/releases" )
22+ }
23+ }
24+
25+ filter {
26+ includeGroup(" net.azureaaron" )
27+ }
28+ }
2729}
2830
2931dependencies {
3032 minecraft(" com.mojang:minecraft:${stonecutter.current.version} " )
31- mappings(" net.fabricmc:yarn: ${property( " deps.yarn_mappings " )} :v2 " )
33+ mappings(loom.officialMojangMappings() )
3234 modImplementation(" net.fabricmc:fabric-loader:${property(" deps.fabric_loader" )} " )
3335 modImplementation(" net.fabricmc.fabric-api:fabric-api:${property(" deps.fabric_api" )} " )
3436
3537 modImplementation(" maven.modrinth:midnightlib:${property(" deps.midnightlib_version" )} " )
3638 include(" maven.modrinth:midnightlib:${property(" deps.midnightlib_version" )} " )
3739
38- modImplementation(" com.terraformersmc:modmenu:${property(" deps.modmenu_version" )} " )
39- modImplementation(" io.wispforest:owo-lib:${property(" deps.owo_version" )} " )
40-
41- modRuntimeOnly(" me.djtheredstoner:DevAuth-fabric:1.2.1" )
40+ modImplementation(" net.azureaaron:hm-api:${property(" deps.hm_api_version" )} " )
41+ include(" net.azureaaron:hm-api:${property(" deps.hm_api_version" )} " )
4242
43- implementation( " com.google.code.gson:gson:2.10.1 " )
44- implementation( " org.apache.httpcomponents:httpclient:4.5.13 " )
43+ modRuntimeOnly( " me.djtheredstoner:DevAuth-fabric:1.2.2 " )
44+ modRuntimeOnly( " maven.modrinth:modmenu: ${property( " deps.modmenu_version " )} " )
4545}
4646
47- // Add this mixin configuration block
4847loom {
4948 decompilerOptions.named(" vineflower" ) {
5049 options.put(" mark-corresponding-synthetics" , " 1" ) // Adds names to lambdas - useful for mixins
@@ -71,21 +70,23 @@ tasks {
7170 inputs.property(" name" , project.property(" mod.name" ))
7271 inputs.property(" version" , project.property(" mod.version" ))
7372 inputs.property(" minecraft" , project.property(" mod.mc_dep" ))
74- inputs.property(" owo_version" , project.property(" deps.owo_version" ))
75- inputs.property(" midnightlib_version" , project.property(" deps.midnightlib_version" ))
73+ inputs.property(" fabricloader" , project.property(" deps.fabric_loader" ))
74+ inputs.property(" midnightlib" , project.property(" deps.midnightlib_version" ))
75+ inputs.property(" fabric_api" , project.property(" deps.fabric_api" ))
76+ inputs.property(" hm_api" , project.property(" deps.hm_api_version" ))
7677
7778 val props = mapOf (
7879 " id" to project.property(" mod.id" ),
7980 " name" to project.property(" mod.name" ),
8081 " version" to project.property(" mod.version" ),
8182 " minecraft" to project.property(" mod.mc_dep" ),
82- " owo_version" to project.property(" deps.owo_version" ),
83- " midnightlib_version" to project.property(" deps.midnightlib_version" )
83+ " fabricloader" to project.property(" deps.fabric_loader" ),
84+ " midnightlib" to project.property(" deps.midnightlib_version" ),
85+ " fabric_api" to project.property(" deps.fabric_api" ),
86+ " hm_api" to project.property(" deps.hm_api_version" ),
8487 )
8588
86- filesMatching(" fabric.mod.json" ) {
87- expand(props)
88- }
89+ filesMatching(" fabric.mod.json" ) { expand(props) }
8990 }
9091
9192 jar {
@@ -97,22 +98,12 @@ tasks {
9798 // Builds the version into a shared folder in `build/libs/${mod version}/`
9899 register<Copy >(" buildAndCollect" ) {
99100 group = " build"
100- from(
101- remapJar.map { it.archiveFile },
102- remapSourcesJar.map { it.archiveFile }
103- )
101+ from(remapJar.map { it.archiveFile }, remapSourcesJar.map { it.archiveFile })
104102 into(rootProject.layout.buildDirectory.file(" libs/${project.property(" mod.version" )} " ))
105103 dependsOn(" build" )
106104 }
107105}
108106
109- stonecutter {
110- replacements.string(current.parsed >= " 1.21.11" ) {
111- replace(" Components" , " UIComponents" )
112- replace(" Containers" , " UIContainers" )
113- }
114- }
115-
116107publishMods {
117108 file = tasks.remapJar.map { it.archiveFile.get() }
118109 additionalFiles.from(tasks.remapSourcesJar.map { it.archiveFile.get() })
@@ -132,9 +123,6 @@ publishMods {
132123 requires {
133124 slug = " P7dR8mSH" // Fabric API
134125 }
135- requires {
136- slug = " ccKDOlHs" // OwO Lib
137- }
138126 optional {
139127 slug = " mOgUt4GM" // ModMenu
140128 }
@@ -147,9 +135,6 @@ publishMods {
147135 requires {
148136 slug = " fabric-api"
149137 }
150- requires {
151- slug = " owo-lib"
152- }
153138 optional {
154139 slug = " modmenu"
155140 }
0 commit comments