@@ -2,27 +2,9 @@ import net.fabricmc.loom.task.AbstractRunTask
22import net.ltgt.gradle.errorprone.errorprone
33
44plugins {
5- id(" quiet-fabric-loom" ) version " 0.8 -SNAPSHOT"
5+ id(" quiet-fabric-loom" ) version " 0.10 -SNAPSHOT"
66}
77
8- /* set up a testmod source set */
9- val testmod by sourceSets.creating {
10- val main = sourceSets.main.get()
11- compileClasspath + = main.compileClasspath
12- runtimeClasspath + = main.runtimeClasspath
13- dependencies.add(implementationConfigurationName, main.output)
14- }
15-
16- val testmodJar by tasks.creating(Jar ::class ) {
17- archiveClassifier.set(" testmod-dev" )
18- group = LifecycleBasePlugin .BUILD_GROUP
19- from(testmod.output)
20- }
21-
22- loom.unmappedModCollection.from(testmodJar)
23-
24- /* end of testmod setup */
25-
268tasks {
279 compileJava {
2810 options.errorprone {
@@ -59,7 +41,7 @@ tasks {
5941
6042dependencies {
6143 minecraft(" com.mojang" , " minecraft" , Versions .fabricMc)
62- mappings(minecraft .officialMojangMappings())
44+ mappings(loom .officialMojangMappings())
6345 modImplementation(" net.fabricmc" , " fabric-loader" , Versions .fabricLoader)
6446 modImplementation(fabricApi.module(" fabric-command-api-v1" , Versions .fabricApi))
6547 modImplementation(fabricApi.module(" fabric-lifecycle-events-v1" , Versions .fabricApi))
@@ -73,33 +55,21 @@ dependencies {
7355 api(include(" io.leangen.geantyref" , " geantyref" , Versions .geantyref))
7456}
7557
76- indra {
77- includeJavaSoftwareComponentInPublications(false )
78- configurePublications {
79- // add all the jars that should be included when publishing to maven
80- artifact(tasks.remapJar) {
81- builtBy(tasks.remapJar)
82- }
83- artifact(tasks.sourcesJar) {
84- builtBy(tasks.remapSourcesJar)
85- }
86- artifact(tasks.javadocJar) {
87- builtBy(tasks.javadocJar)
88- }
58+ /* set up a testmod source set */
59+ val testmod: SourceSet by sourceSets.creating {
60+ val main = sourceSets.main.get()
61+ compileClasspath + = main.compileClasspath
62+ runtimeClasspath + = main.runtimeClasspath
63+ dependencies.add(implementationConfigurationName, main.output)
64+ }
8965
90- // Loom is broken with project dependencies in the same build (because it resolves dependencies during configuration)
91- // Please look away
92- pom {
93- withXml {
94- val dependencies = asNode().appendNode(" dependencies" )
95- sequenceOf(" brigadier" , " core" , " services" ).forEach {
96- val depNode = dependencies.appendNode(" dependency" )
97- depNode.appendNode(" groupId" , project.group)
98- depNode.appendNode(" artifactId" , " cloud-$it " )
99- depNode.appendNode(" version" , project.version)
100- depNode.appendNode(" scope" , " compile" )
101- }
102- }
103- }
104- }
66+ val testmodJar by tasks.registering(Jar ::class ) {
67+ archiveClassifier.set(" testmod-dev" )
68+ group = LifecycleBasePlugin .BUILD_GROUP
69+ from(testmod.output)
70+ }
71+
72+ tasks.withType<AbstractRunTask > {
73+ classpath(testmodJar)
10574}
75+ /* end of testmod setup */
0 commit comments