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 babric .SubprojectHelpers.addDependencyXML
4+ import net.modificationstation.stationapi.gradle .SubprojectHelpers.addDependencyXML
55
66plugins {
77 id(" maven-publish" )
88 id(" fabric-loom" ) version " 1.9-SNAPSHOT"
9- id(" babric-loom-extension" ) version " 1.9.4 "
9+ id(" babric-loom-extension" ) version " 1.9.2 "
1010}
1111
1212// https://stackoverflow.com/a/40101046 - Even with kotlin, gradle can't get it's shit together.
@@ -40,7 +40,13 @@ 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.
4347 all {
48+ exclude(group = " org.ow2.asm" , module = " asm-debug-all" )
49+ exclude(group = " org.ow2.asm" , module = " asm-all" )
4450 exclude(group = " babric" )
4551 }
4652 }
@@ -60,16 +66,16 @@ allprojects {
6066
6167 modImplementation(" net.fabricmc:fabric-loader:${project.properties[" loader_version" ]} " )
6268
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 )
69+ " transitiveImplementation" ( " org.apache.commons:commons-lang3:3.12.0" )
70+ " transitiveImplementation" ( " commons-io:commons-io:2.11.0" )
71+ " transitiveImplementation" ( " net.jodah:typetools:${project.properties[" typetools_version" ]} " )
72+ " transitiveImplementation" ( " com.github.mineLdiver:UnsafeEvents:${project.properties[" unsafeevents_version" ]} " )
73+ " transitiveImplementation" ( " it.unimi.dsi:fastutil:${project.properties[" fastutil_version" ]} " )
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" ]} " )
77+ " transitiveImplementation" ( " me.carleslc:Simple-Yaml:1.8.4" )
78+ " transitiveImplementation" ( " net.glasslauncher.mods:GlassConfigAPI:${project.properties[" gcapi_version" ]} " )
7379
7480 // convenience stuff
7581 // adds some useful annotations for data classes. does not add any dependencies
@@ -159,9 +165,20 @@ allprojects {
159165 artifact(tasks.getByName(" remapJar" )).builtBy(tasks.getByName(" remapJar" ))
160166 artifact(tasks.getByName(" remapSourcesJar" )).builtBy(tasks.getByName(" remapJar" ))
161167 }
162- // Remove this once I fix a **weird** edge case bug in babric.
163- pom.withXml {
164- this .asNode().appendNode(" dependencies" )
168+
169+ pom {
170+ withXml {
171+ // Wipes dependency block, cause it's just hopelessly wrong, and also includes floader for some reason
172+ val depsNode = asNode().appendNode(" dependencies" )
173+ // Jank solution to an annoying issue
174+ configurations.getByName(" transitiveImplementation" ).dependencies.forEach {
175+ val depNode = depsNode.appendNode(" dependency" )
176+ depNode.appendNode(" groupId" , it.group)
177+ depNode.appendNode(" artifactId" , it.name)
178+ depNode.appendNode(" version" , it.version)
179+ depNode.appendNode(" scope" , " compile" )
180+ }
181+ }
165182 }
166183 }
167184 }
0 commit comments