2019-07-11 08:59:23 +08:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
id("org.spongepowered.plugin")
|
|
|
|
}
|
|
|
|
|
|
|
|
applyPlatformAndCoreConfiguration()
|
|
|
|
applyShadowConfiguration()
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile(project(":worldedit-core"))
|
|
|
|
compile(project(":worldedit-libs:sponge"))
|
|
|
|
compile("org.spongepowered:spongeapi:7.1.0")
|
2020-01-24 20:38:52 +08:00
|
|
|
compile("org.bstats:bstats-sponge:1.7")
|
2019-07-11 08:59:23 +08:00
|
|
|
testCompile("org.mockito:mockito-core:1.9.0-rc1")
|
|
|
|
}
|
|
|
|
|
|
|
|
sponge {
|
|
|
|
plugin {
|
|
|
|
id = "worldedit"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named<Jar>("jar") {
|
|
|
|
manifest {
|
Add new experimental snapshot API (#524)
* Add new experimental snapshot API
This API intends to replace the existing snapshot API in WorldEdit 8.
It is currently experimental, and the old API is soft-deprecated. Once
it is determined to be stable, the old API will be removed and replaced
with this new one.
It uses TrueVFS instead of TrueZIP, due to the latter's status as
matinence-only, and the face that TrueVFS is NIO-FileSystem compatible,
allowing us to integrate it with NIO's native zipfs. The TrueVFS system
does encompass multiple modules, but users and download + install
truevfs-profile-default as a fatjar. We depend on that profile to show
this as the intended solution.
* Port commands to experimental snapshots. Legacy ones are in sibling classes.
* Add many tests, fix bugs
* Clean up imports
* Verify sorting behaviors, fix bugs
* Add license to test
* Add support for DIM region folders
* Fix tests for Windows paths
* Rewrite tests for even more coverage, fix bugs
* Clean up naming on tests
* Add test for legacy format
* Stop trying to abuse `file://`, use `snapfs:` instead
* Simplify iterPaths
* Use File.separator in FS snap tests
* Fix some bugs from T9N PR (#538)
* Use printInfo/printError to keep colors right
* Escape quotes before they go in the map
* I18N-ify new snapshot code
2019-12-16 19:00:12 +08:00
|
|
|
attributes("Class-Path" to CLASSPATH,
|
2019-07-11 08:59:23 +08:00
|
|
|
"WorldEdit-Version" to project.version)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named<ShadowJar>("shadowJar") {
|
|
|
|
dependencies {
|
|
|
|
relocate ("org.bstats", "com.sk89q.worldedit.sponge.bstats") {
|
2020-01-24 20:38:52 +08:00
|
|
|
include(dependency("org.bstats:bstats-sponge:1.7"))
|
2019-07-11 08:59:23 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (project.hasProperty("signing")) {
|
|
|
|
apply(plugin = "signing")
|
|
|
|
|
|
|
|
configure<SigningExtension> {
|
|
|
|
sign("shadowJar")
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named("build").configure {
|
|
|
|
dependsOn("signShadowJar")
|
|
|
|
}
|
|
|
|
}
|