[ci-skip] Use shadowJar output as input for paperclip

This commit is contained in:
jmp
2020-12-26 00:34:57 -08:00
parent 822a35a0ba
commit 7152b72d25
2 changed files with 4 additions and 5 deletions

View File

@@ -42,8 +42,9 @@ internal fun Project.initToothpickTasks() {
}
val paperclip = createPaperclipTask {
dependsOn(tasks.getByName("build"))
dependsOn(subprojects.map { it.tasks.getByName("build") })
val shadowJar = toothpick.serverProject.project.tasks.getByName("shadowJar")
dependsOn(shadowJar)
inputs.file(shadowJar.outputs.files.singleFile)
}
val applyPatches = createApplyPatchesTask {

View File

@@ -19,9 +19,7 @@ internal fun Project.createPaperclipTask(
val paperclipDir = workDir.resolve("Paperclip")
val vanillaJarPath =
workDir.resolve("Minecraft/${toothpick.minecraftVersion}/${toothpick.minecraftVersion}.jar").absolutePath
val patchedJarPath = toothpick.serverProject.projectDir.resolve(
"build/libs/${toothpick.forkNameLowercase}-server-$version.jar"
).absolutePath
val patchedJarPath = inputs.files.singleFile.absolutePath
logger.lifecycle(">>> Building paperclip")
val paperclipCmd = arrayListOf(
"mvn", "clean", "package",