Small buildscript fixes

- Update devauth
- Fix remapJar not being included when configuring all tasks with type Jar
- Rename intermediate artifacts and folder to better show what they are
This commit is contained in:
ILikePlayingGames 2024-07-05 21:08:07 -04:00 committed by Linnea Gräf
parent 442a29a0fd
commit b96ba8a968

View file

@ -80,7 +80,7 @@ dependencies {
annotationProcessor("org.spongepowered:mixin:0.8.5-SNAPSHOT")
// If you don't want to log in with your real minecraft account, remove this line
runtimeOnly("me.djtheredstoner:DevAuth-forge-legacy:1.1.2")
runtimeOnly("me.djtheredstoner:DevAuth-forge-legacy:1.2.1")
}
@ -90,7 +90,7 @@ tasks.withType(JavaCompile::class) {
options.encoding = "UTF-8"
}
tasks.withType(Jar::class) {
tasks.withType(org.gradle.jvm.tasks.Jar::class) {
archiveBaseName.set(modid)
manifest.attributes.run {
this["FMLCorePluginContainsFMLMod"] = "true"
@ -124,16 +124,16 @@ val remapJar by tasks.named<net.fabricmc.loom.task.RemapJarTask>("remapJar") {
tasks.jar {
archiveClassifier.set("without-deps")
destinationDirectory.set(layout.buildDirectory.dir("badjars"))
destinationDirectory.set(layout.buildDirectory.dir("intermediates"))
}
tasks.shadowJar {
destinationDirectory.set(layout.buildDirectory.dir("badjars"))
archiveClassifier.set("all-dev")
destinationDirectory.set(layout.buildDirectory.dir("intermediates"))
archiveClassifier.set("non-obfuscated-with-deps")
configurations = listOf(shadowImpl)
doLast {
configurations.forEach {
println("Copying jars into mod: ${it.files}")
println("Copying dependencies into mod: ${it.files}")
}
}