From c5d6466eed0041fe6e09cdadef6ed6ae06124e30 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Wed, 30 Oct 2019 17:27:41 +0100 Subject: [PATCH] Fixes #1304 A bit late but I'm going thru my old issues ;p --- nukkit/build.gradle | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/nukkit/build.gradle b/nukkit/build.gradle index 5b7cc8fc..023cf8f6 100644 --- a/nukkit/build.gradle +++ b/nukkit/build.gradle @@ -23,8 +23,42 @@ processResources { } apply plugin: 'com.github.johnrengelman.shadow' -// We only want the shadow jar produced -jar.enabled = false + +jar.archiveName="fawe-nukkit-${project.parent.version}.jar" +jar.destinationDir = file '../mvn/com/boydti/fawe-nukkit/' + project.parent.version +task createPom << { + pom { + project { + groupId 'com.boydti' + artifactId 'fawe-nukkit' + version project.parent.version + } + } + .getEffectivePom() + .setDependencies(new ArrayList<>()) + .writeTo("../mvn/com/boydti/fawe-nukkit/${project.parent.version}/fawe-nukkit-${project.parent.version}.pom") + pom { + project { + groupId 'com.boydti' + artifactId 'fawe-nukkit' + version 'latest' + } + } + .getEffectivePom() + .setDependencies(new ArrayList<>()) + .writeTo("../mvn/com/boydti/fawe-nukkit/latest/fawe-nukkit-latest.pom") +} +task copyFiles { + doLast { + copy { + from "../mvn/com/boydti/fawe-nukkit/${project.parent.version}/" + into '../mvn/com/boydti/fawe-nukkit/latest/' + include('fawe-nukkit*.jar') + rename ("fawe-nukkit-${project.parent.version}.jar", 'fawe-nukkit-latest.jar') + } + } +} + shadowJar { dependencies { include(dependency('com.github.luben:zstd-jni:1.1.1')) @@ -51,4 +85,6 @@ shadowJar.doLast { ant.checksum file: task.archivePath } -build.dependsOn(shadowJar); \ No newline at end of file +build.dependsOn(shadowJar) +build.finalizedBy(copyFiles) +copyFiles.dependsOn(createPom)