Skip to content

Commit

Permalink
Small buildscript fixes
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
ILikePlayingGames authored and nea89o committed Jul 6, 2024
1 parent 442a29a commit b96ba8a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")

}

Expand All @@ -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"
Expand Down Expand Up @@ -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}")
}
}

Expand Down

0 comments on commit b96ba8a

Please sign in to comment.