11// tl;dr, tells us off for using properties for versions. Too bad, we don't like trawling this file for version numbers.
22@file:Suppress(" GradlePackageVersionRange" )
33
4- import net.modificationstation.stationapi.gradle .SubprojectHelpers.addDependencyXML
4+ import babric .SubprojectHelpers.addDependencyXML
55
66plugins {
77 id(" maven-publish" )
88 id(" fabric-loom" ) version " 1.9-SNAPSHOT"
9- id(" babric-loom-extension" ) version " 1.9.2 "
9+ id(" babric-loom-extension" ) version " 1.9.4 "
1010}
1111
1212// https://stackoverflow.com/a/40101046 - Even with kotlin, gradle can't get it's shit together.
@@ -40,13 +40,8 @@ allprojects {
4040 }
4141
4242 configurations {
43- val transitiveImplementation = create(" transitiveImplementation" )
44- implementation.get().extendsFrom(transitiveImplementation)
45-
46- // Required cause loom 0.14 for some reason doesn't remove asm-all 4.1. Ew.
4743 all {
48- exclude(group = " org.ow2.asm" , module = " asm-debug-all" )
49- exclude(group = " org.ow2.asm" , module = " asm-all" )
44+ exclude(group = " babric" )
5045 }
5146 }
5247
@@ -65,15 +60,16 @@ allprojects {
6560
6661 modImplementation(" net.fabricmc:fabric-loader:${project.properties[" loader_version" ]} " )
6762
68- " transitiveImplementation" (" org.apache.commons:commons-lang3:3.12.0" )
69- " transitiveImplementation" (" commons-io:commons-io:2.11.0" )
70- " transitiveImplementation" (" net.jodah:typetools:${project.properties[" typetools_version" ]} " )
71- " transitiveImplementation" (" com.github.mineLdiver:UnsafeEvents:${project.properties[" unsafeevents_version" ]} " )
72- " transitiveImplementation" (" it.unimi.dsi:fastutil:${project.properties[" fastutil_version" ]} " )
73- // noinspection GradlePackageUpdate
74- " transitiveImplementation" (" com.github.ben-manes.caffeine:caffeine:${project.properties[" caffeine_version" ]} " )
75- " transitiveImplementation" (" com.mojang:datafixerupper:${project.properties[" dfu_version" ]} " )
76- " transitiveImplementation" (" maven.modrinth:spasm:${project.properties[" spasm_version" ]} " )
63+ transitiveImplementation(modImplementation(" org.apache.commons:commons-lang3:3.12.0" ) as Dependency )
64+ transitiveImplementation(modImplementation(" commons-io:commons-io:2.11.0" ) as Dependency )
65+ transitiveImplementation(modImplementation(" net.jodah:typetools:${project.properties[" typetools_version" ]} " ) as Dependency )
66+ transitiveImplementation(modImplementation(" com.github.mineLdiver:UnsafeEvents:${project.properties[" unsafeevents_version" ]} " ) as Dependency )
67+ transitiveImplementation(modImplementation(" it.unimi.dsi:fastutil:${project.properties[" fastutil_version" ]} " ) as Dependency )
68+ transitiveImplementation(modImplementation(" com.github.ben-manes.caffeine:caffeine:${project.properties[" caffeine_version" ]} " ) as Dependency )
69+ transitiveImplementation(modImplementation(" com.mojang:datafixerupper:${project.properties[" dfu_version" ]} " ) as Dependency )
70+ transitiveImplementation(modImplementation(" maven.modrinth:spasm:${project.properties[" spasm_version" ]} " ) as Dependency )
71+ transitiveImplementation(modImplementation(" me.carleslc:Simple-Yaml:1.8.4" ) as Dependency )
72+ transitiveImplementation(modImplementation(" net.glasslauncher.mods:GlassConfigAPI:${project.properties[" gcapi_version" ]} " ) as Dependency )
7773
7874 // convenience stuff
7975 // adds some useful annotations for data classes. does not add any dependencies
@@ -85,21 +81,15 @@ allprojects {
8581 // adds some useful annotations for miscellaneous uses. does not add any dependencies, though people without the lib will be missing some useful context hints.
8682 implementation(" org.jetbrains:annotations:23.0.0" )
8783
88- modLocalRuntime(" net.glasslauncher.mods:ModMenu:${project.properties[" modmenu_version" ]} " ) {
89- isTransitive = false
90- }
84+ modLocalRuntime(" net.glasslauncher.mods:ModMenu:${project.properties[" modmenu_version" ]} " )
9185 modLocalRuntime(" maven.modrinth:retrocommands:${project.properties[" rc_version" ]} " ) {
9286 isTransitive = false
9387 }
9488
9589 annotationProcessor(" io.github.llamalad7:mixinextras-fabric:0.4.1" )
96- }
9790
98- loom {
99- @Suppress(" UnstableApiUsage" ) // Too bad, this is needed.
100- mixin {
101- useLegacyMixinAp.set(true )
102- }
91+ // Optional bugfix mod for testing qol. Remove the // to enable.
92+ // modLocalRuntime "maven.modrinth:mojangfix:${project.properties["mojangfix_version"]}"
10393 }
10494
10595 sourceSets {
@@ -169,20 +159,9 @@ allprojects {
169159 artifact(tasks.getByName(" remapJar" )).builtBy(tasks.getByName(" remapJar" ))
170160 artifact(tasks.getByName(" remapSourcesJar" )).builtBy(tasks.getByName(" remapJar" ))
171161 }
172-
173- pom {
174- withXml {
175- // Wipes dependency block, cause it's just hopelessly wrong, and also includes floader for some reason
176- val depsNode = asNode().appendNode(" dependencies" )
177- // Jank solution to an annoying issue
178- configurations.getByName(" transitiveImplementation" ).dependencies.forEach {
179- val depNode = depsNode.appendNode(" dependency" )
180- depNode.appendNode(" groupId" , it.group)
181- depNode.appendNode(" artifactId" , it.name)
182- depNode.appendNode(" version" , it.version)
183- depNode.appendNode(" scope" , " compile" )
184- }
185- }
162+ // Remove this once I fix a **weird** edge case bug in babric.
163+ pom.withXml {
164+ this .asNode().appendNode(" dependencies" )
186165 }
187166 }
188167 }
@@ -291,4 +270,9 @@ tasks.register<Jar>("testJar") {
291270 from(sourceSets[" test" ].output)
292271 archiveClassifier.convention(" test" )
293272 archiveClassifier.set(" test" )
273+ }
274+
275+ // Gradle I swear to fuck stop trying to do bullshit to the maven - calm
276+ tasks.withType<GenerateModuleMetadata > {
277+ enabled = false
294278}
0 commit comments