A bit late but I'm going thru my old issues ;p
This commit is contained in:
NotMyFault 2019-10-30 17:27:41 +01:00 committed by GitHub
parent 58243b6757
commit c5d6466eed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,8 +23,42 @@ processResources {
} }
apply plugin: 'com.github.johnrengelman.shadow' 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 { shadowJar {
dependencies { dependencies {
include(dependency('com.github.luben:zstd-jni:1.1.1')) include(dependency('com.github.luben:zstd-jni:1.1.1'))
@ -51,4 +85,6 @@ shadowJar.doLast {
ant.checksum file: task.archivePath ant.checksum file: task.archivePath
} }
build.dependsOn(shadowJar); build.dependsOn(shadowJar)
build.finalizedBy(copyFiles)
copyFiles.dependsOn(createPom)