From cc5c1a8d1cb3e1042908d59e17199ffadfff0fc7 Mon Sep 17 00:00:00 2001 From: nea Date: Sat, 29 Apr 2023 01:17:00 +0200 Subject: Move intermediary jars to extra directory --- README.md | 3 ++- build.gradle.kts | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8dbac4c..d61b6f5 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ Project SDK to the Java 1.8 JDK. Then click on the sync button in IntelliJ, and called `Minecraft Client`. If it doesn't then try relaunching your IntelliJ. **Warning for Mac users**: You might have to remove the `-XStartOnFirstThread` vm argument from your run configuration. In the future, that should be handled by the plugin, but for now you'll probably have to do that manually. To export your project, run the `gradle build` task, and give other people the -file `build/libs/--all.jar` +file `build/libs/-.jar`. Ignore the jars in the `build/badjars` folder. Those are intermediary jars that +are used by the build system but *do not work* in a normal forge installation. ### For those who have not an attention span diff --git a/build.gradle.kts b/build.gradle.kts index c63956b..c5eb641 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -90,17 +90,23 @@ tasks.withType(Jar::class) { val remapJar by tasks.named("remapJar") { - archiveClassifier.set("all") + archiveClassifier.set("") from(tasks.shadowJar) input.set(tasks.shadowJar.get().archiveFile) } +tasks.jar { + archiveClassifier.set("without-deps") + destinationDirectory.set(layout.buildDirectory.dir("badjars")) +} + tasks.shadowJar { + destinationDirectory.set(layout.buildDirectory.dir("badjars")) archiveClassifier.set("all-dev") configurations = listOf(shadowImpl) doLast { configurations.forEach { - println("Config: ${it.files}") + println("Copying jars into mod: ${it.files}") } } -- cgit