mirror of
https://github.com/SimplexDevelopment/SimplexCore.git
synced 2024-12-22 08:37:37 +00:00
78 lines
2.0 KiB
Groovy
78 lines
2.0 KiB
Groovy
plugins {
|
|
id "java"
|
|
id "com.github.johnrengelman.shadow" version "6.1.0"
|
|
}
|
|
|
|
version project.properties["pluginVersion"]
|
|
targetCompatibility = sourceCompatibility = JavaVersion.VERSION_11
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
|
|
//maven artifact repo urls
|
|
[
|
|
"https://jitpack.io",
|
|
"https://papermc.io/repo/repository/maven-public/",
|
|
"https://oss.sonatype.org/content/groups/public/",
|
|
"https://repo.extendedclip.com/content/repositories/placeholderapi/",
|
|
"http://repo.comphenix.net/content/repositories/releases/",
|
|
"http://repo.comphenix.net/content/repositories/snapshots/"
|
|
].each { s ->
|
|
maven {
|
|
url s
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
//provided
|
|
[
|
|
"com.destroystokyo.paper:paper-api:1.16.4-R0.1-SNAPSHOT",
|
|
"net.md-5:bungeecord-api:1.16-R0.4-SNAPSHOT",
|
|
"io.github.waterfallmc:waterfall-api:1.16-R0.4-SNAPSHOT",
|
|
"me.clip:placeholderapi:2.10.9",
|
|
].each {s ->
|
|
compileOnly s
|
|
}
|
|
|
|
compileOnly ("com.github.dmulloy2:ProtocolLib:4.5.1") {
|
|
exclude group: "com.comphenix.executors"
|
|
}
|
|
|
|
//compile
|
|
[
|
|
"org.jetbrains:annotations:20.1.0",
|
|
"org.reflections:reflections:0.9.12"
|
|
].each {s ->
|
|
implementation s
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
classifier project.properties["pluginJarClassifier"].toString()
|
|
baseName project.properties["pluginName"].toString()
|
|
|
|
//shading and relocation
|
|
[
|
|
"org.reflections",
|
|
"javassist"
|
|
].each {s ->
|
|
relocate s, "${project.properties["pluginMainPackage"]}.shaded.$s"
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
//update resources when building
|
|
doFirst {
|
|
file("$buildDir/resources/main").listFiles().each {
|
|
it.delete()
|
|
}
|
|
}
|
|
|
|
//define variables
|
|
expand(
|
|
"pluginVersion": project.version,
|
|
"pluginName": project.properties["pluginName"],
|
|
"pluginMain": "${project.properties["pluginMainPackage"]}.${project.properties["pluginMain"]}"
|
|
)
|
|
} |