2020-10-08 13:27:23 +02:00
|
|
|
import java.time.format.DateTimeFormatter
|
|
|
|
|
2020-09-20 22:42:13 +02:00
|
|
|
dependencies {
|
|
|
|
// Expected everywhere.
|
2022-06-09 12:57:37 +02:00
|
|
|
compileOnlyApi("org.checkerframework:checker-qual")
|
2020-09-20 22:42:13 +02:00
|
|
|
|
|
|
|
// Minecraft expectations
|
2022-06-09 12:57:37 +02:00
|
|
|
compileOnlyApi("com.google.code.gson:gson")
|
|
|
|
compileOnly("com.google.guava:guava")
|
2020-09-20 22:42:13 +02:00
|
|
|
|
|
|
|
// Platform expectations
|
2022-06-09 12:57:37 +02:00
|
|
|
compileOnlyApi("org.yaml:snakeyaml")
|
2020-09-20 22:42:13 +02:00
|
|
|
|
2021-04-30 09:50:22 +02:00
|
|
|
// Adventure
|
2022-06-09 12:57:37 +02:00
|
|
|
api("net.kyori:adventure-api")
|
|
|
|
api("net.kyori:adventure-text-minimessage")
|
2020-09-20 22:42:13 +02:00
|
|
|
|
|
|
|
// Guice
|
2021-04-30 09:50:22 +02:00
|
|
|
api(libs.guice) {
|
2020-10-08 13:27:23 +02:00
|
|
|
exclude(group = "com.google.guava")
|
|
|
|
}
|
2021-04-30 09:50:22 +02:00
|
|
|
api(libs.guiceassistedinject) {
|
2020-10-08 13:27:23 +02:00
|
|
|
exclude("com.google.inject", "guice")
|
|
|
|
}
|
2022-04-19 00:48:23 +02:00
|
|
|
api(libs.spotbugs)
|
2020-09-20 22:42:13 +02:00
|
|
|
|
2020-10-08 13:27:23 +02:00
|
|
|
// Plugins
|
2021-11-05 11:57:58 +01:00
|
|
|
compileOnly(libs.worldeditCore) {
|
2020-10-08 13:27:23 +02:00
|
|
|
exclude(group = "bukkit-classloader-check")
|
|
|
|
exclude(group = "mockito-core")
|
|
|
|
exclude(group = "dummypermscompat")
|
|
|
|
}
|
2021-04-30 09:50:22 +02:00
|
|
|
testImplementation(libs.worldeditCore)
|
2022-06-09 12:57:37 +02:00
|
|
|
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Core") { isTransitive = false }
|
|
|
|
testImplementation("com.fastasyncworldedit:FastAsyncWorldEdit-Core") { isTransitive = false }
|
2020-09-20 22:42:13 +02:00
|
|
|
|
2020-10-08 13:28:58 +02:00
|
|
|
// Logging
|
2022-06-09 12:57:37 +02:00
|
|
|
compileOnlyApi("org.apache.logging.log4j:log4j-api")
|
2020-10-08 13:28:58 +02:00
|
|
|
|
|
|
|
// Other libraries
|
2021-04-30 09:50:22 +02:00
|
|
|
api(libs.prtree)
|
|
|
|
api(libs.aopalliance)
|
2021-12-31 15:49:11 +01:00
|
|
|
api(libs.cloudServices)
|
2021-04-30 09:50:22 +02:00
|
|
|
api(libs.arkitektonika)
|
2022-06-09 12:57:37 +02:00
|
|
|
api("com.intellectualsites.paster:Paster")
|
2022-06-21 19:09:17 +02:00
|
|
|
api("com.intellectualsites.informative-annotations:informative-annotations")
|
2020-10-08 13:27:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.processResources {
|
|
|
|
filesMatching("plugin.properties") {
|
|
|
|
expand(
|
2021-12-14 23:04:36 +01:00
|
|
|
"version" to project.version.toString(),
|
|
|
|
"commit" to rootProject.grgit.head().abbreviatedId,
|
|
|
|
"date" to rootProject.grgit.head().dateTime.format(DateTimeFormatter.ofPattern("yy.MM.dd"))
|
2020-10-08 13:27:23 +02:00
|
|
|
)
|
|
|
|
}
|
2022-10-08 15:10:57 +02:00
|
|
|
|
|
|
|
doLast {
|
|
|
|
copy {
|
|
|
|
from(File("$rootDir/LICENSE"))
|
|
|
|
into("$buildDir/resources/main/")
|
|
|
|
}
|
|
|
|
}
|
2020-09-20 22:42:13 +02:00
|
|
|
}
|
2022-01-27 13:26:27 +01:00
|
|
|
|
|
|
|
tasks {
|
|
|
|
withType<Javadoc> {
|
2023-01-11 22:11:11 +01:00
|
|
|
val isRelease = if (rootProject.version.toString().endsWith("-SNAPSHOT")) "TODO" else rootProject.version.toString()
|
2022-01-27 13:26:27 +01:00
|
|
|
val opt = options as StandardJavadocDocletOptions
|
|
|
|
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/" + libs.worldeditCore.get().versionConstraint.toString())
|
2023-01-09 10:21:55 +01:00
|
|
|
opt.links("https://jd.adventure.kyori.net/api/4.12.0/")
|
|
|
|
opt.links("https://jd.adventure.kyori.net/text-minimessage/4.12.0/")
|
2022-01-27 13:26:27 +01:00
|
|
|
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
|
|
|
opt.links("https://checkerframework.org/api/")
|
2022-06-21 19:09:17 +02:00
|
|
|
opt.links("https://javadoc.io/doc/com.intellectualsites.informative-annotations/informative-annotations/latest/")
|
2023-01-11 18:25:51 +01:00
|
|
|
opt.isLinkSource = true
|
|
|
|
opt.bottom(File("$rootDir/javadocfooter.html").readText())
|
|
|
|
opt.isUse = true
|
2022-07-03 14:58:17 +02:00
|
|
|
opt.encoding("UTF-8")
|
2023-01-11 18:25:51 +01:00
|
|
|
opt.keyWords()
|
2023-01-11 22:11:11 +01:00
|
|
|
opt.addStringOption("-since", isRelease)
|
2022-01-27 13:26:27 +01:00
|
|
|
}
|
|
|
|
}
|