FastAsyncWorldedit/nukkit/build.gradle

91 lines
2.7 KiB
Groovy
Raw Normal View History

2016-09-04 19:25:33 +02:00
repositories {
flatDir {dirs 'lib'}
// maven {url "https://repo.potestas.xyz/main/"}
2016-09-04 19:25:33 +02:00
}
2018-03-09 15:59:19 +01:00
2018-03-14 11:49:07 +01:00
clean { delete "../target" }
2018-03-09 15:59:19 +01:00
2016-09-04 17:34:38 +02:00
dependencies {
compile project(':core')
// compile 'cn.nukkit:nukkit:1.0-SNAPSHOT'
compile name: 'nukkit-1.0-SNAPSHOT'
compile name: 'worldedit-core-6.1.4-SNAPSHOT-dist'
2016-09-04 17:34:38 +02:00
}
processResources {
from('src/main/resources') {
include 'plugin.yml'
expand(
name: project.parent.name,
version: project.parent.version
)
}
}
apply plugin: 'com.github.johnrengelman.shadow'
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')
}
}
}
2016-09-04 17:34:38 +02:00
shadowJar {
dependencies {
include(dependency('com.github.luben:zstd-jni:1.1.1'))
2017-03-26 20:14:28 +02:00
// include(dependency('org.javassist:javassist:3.22.0-CR1'))
include(dependency('co.aikar:fastutil-lite:1.0'))
2016-09-04 19:25:33 +02:00
include(dependency(name: 'worldedit-core-6.1.4-SNAPSHOT-dist'))
include(dependency('com.google.code.gson:gson:2.2.4'))
include(dependency('org.yaml:snakeyaml:1.16'))
include(dependency('com.google.guava:guava:17.0'))
2016-09-05 04:35:05 +02:00
include(dependency(':core'))
2016-09-04 17:34:38 +02:00
}
archiveName = "${parent.name}-${project.name}-${parent.version}.jar"
destinationDir = file '../target'
manifest {
attributes("Main-Class": "com.boydti.fawe.nukkit.core.converter.ConverterFrame")
}
2016-09-04 19:25:33 +02:00
relocate('com.google.gson', 'com.sk89q.worldedit.internal.gson')
relocate 'org.yaml.snakeyaml', 'com.boydti.fawe.yaml'
relocate 'com.google.common', 'com.sk89q.worldedit.internal.common'
2016-09-04 17:34:38 +02:00
}
shadowJar.doLast {
task ->
ant.checksum file: task.archivePath
}
build.dependsOn(shadowJar)
build.finalizedBy(copyFiles)
copyFiles.dependsOn(createPom)