Skip to content

Commit bfd0a0b

Browse files
committed
fabric: Update loom
1 parent 7dbc793 commit bfd0a0b

4 files changed

Lines changed: 21 additions & 49 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,4 @@ gradle-app.setting
226226
### Fabric Loom run files ###
227227

228228
/run/
229+
/cloud-minecraft/cloud-fabric/run/

build-logic/src/main/kotlin/Versions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ object Versions {
2323
const val spongeApi7 = "7.3.0"
2424
const val jetbrainsAnnotations = "20.1.0"
2525
const val guava = "21.0-jre"
26-
const val fabricLoader = "0.11.1"
26+
const val fabricLoader = "0.12.5"
2727
const val fabricMc = "1.16.5"
2828
const val fabricApi = "0.31.0+1.16"
2929

cloud-minecraft/cloud-fabric/build.gradle.kts

Lines changed: 18 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,9 @@ import net.fabricmc.loom.task.AbstractRunTask
22
import net.ltgt.gradle.errorprone.errorprone
33

44
plugins {
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-
268
tasks {
279
compileJava {
2810
options.errorprone {
@@ -59,7 +41,7 @@ tasks {
5941

6042
dependencies {
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 */

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ pluginManagement {
22
repositories {
33
gradlePluginPortal()
44
maven("https://maven.fabricmc.net")
5+
maven("https://maven.quiltmc.org/repository/release/")
56
maven("https://repo.jpenilla.xyz/snapshots/")
67
}
78
includeBuild("build-logic")

0 commit comments

Comments
 (0)