2019-07-11 07:45:12 +08:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
`java-library`
|
|
|
|
}
|
|
|
|
|
|
|
|
applyPlatformAndCoreConfiguration()
|
|
|
|
applyShadowConfiguration()
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven { url = uri("https://hub.spigotmc.org/nexus/content/groups/public") }
|
|
|
|
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
|
|
|
|
maven { url = uri("https://papermc.io/repo/repository/maven-public/") }
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations.all {
|
|
|
|
resolutionStrategy {
|
|
|
|
force("com.google.guava:guava:21.0")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
"api"(project(":worldedit-core"))
|
|
|
|
"api"(project(":worldedit-libs:bukkit"))
|
2019-07-16 07:07:11 +08:00
|
|
|
"api"("org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT") {
|
|
|
|
exclude("junit", "junit")
|
|
|
|
}
|
2019-07-11 07:45:12 +08:00
|
|
|
"compileOnly"("com.destroystokyo.paper:paper-api:1.13.2-R0.1-SNAPSHOT")
|
|
|
|
"implementation"("io.papermc:paperlib:1.0.2")
|
|
|
|
"compileOnly"("com.sk89q:dummypermscompat:1.10")
|
|
|
|
"implementation"("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
|
2020-01-24 20:38:52 +08:00
|
|
|
"implementation"("org.bstats:bstats-bukkit:1.7")
|
2019-07-11 07:45:12 +08:00
|
|
|
"testCompile"("org.mockito:mockito-core:1.9.0-rc1")
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named<Copy>("processResources") {
|
|
|
|
filesMatching("plugin.yml") {
|
|
|
|
expand("internalVersion" to project.ext["internalVersion"])
|
|
|
|
}
|
|
|
|
from(zipTree("src/main/resources/worldedit-adapters.jar").matching {
|
|
|
|
exclude("META-INF/")
|
|
|
|
})
|
|
|
|
exclude("**/worldedit-adapters.jar")
|
|
|
|
}
|
|
|
|
|
|
|
|
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 07:45:12 +08:00
|
|
|
"WorldEdit-Version" to project.version)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named<ShadowJar>("shadowJar") {
|
|
|
|
dependencies {
|
|
|
|
relocate("org.slf4j", "com.sk89q.worldedit.slf4j")
|
|
|
|
relocate("org.apache.logging.slf4j", "com.sk89q.worldedit.log4jbridge")
|
2019-10-19 15:48:49 +08:00
|
|
|
relocate("org.antlr.v4", "com.sk89q.worldedit.antlr4")
|
2019-07-11 07:45:12 +08:00
|
|
|
include(dependency(":worldedit-core"))
|
|
|
|
include(dependency("org.slf4j:slf4j-api"))
|
|
|
|
include(dependency("org.apache.logging.log4j:log4j-slf4j-impl"))
|
2019-10-19 15:48:49 +08:00
|
|
|
include(dependency("org.antlr:antlr4-runtime"))
|
2019-07-11 07:45:12 +08:00
|
|
|
relocate("org.bstats", "com.sk89q.worldedit.bukkit.bstats") {
|
2020-01-24 20:38:52 +08:00
|
|
|
include(dependency("org.bstats:bstats-bukkit:1.7"))
|
2019-07-11 07:45:12 +08:00
|
|
|
}
|
|
|
|
relocate("io.papermc.lib", "com.sk89q.worldedit.bukkit.paperlib") {
|
|
|
|
include(dependency("io.papermc:paperlib:1.0.2"))
|
|
|
|
}
|
2019-08-12 20:06:40 +08:00
|
|
|
relocate("it.unimi.dsi.fastutil", "com.sk89q.worldedit.bukkit.fastutil") {
|
|
|
|
include(dependency("it.unimi.dsi:fastutil"))
|
|
|
|
}
|
2019-07-11 07:45:12 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named("assemble").configure {
|
|
|
|
dependsOn("shadowJar")
|
|
|
|
}
|