2022-04-10 06:47:33 +00:00
|
|
|
plugins {
|
2023-03-03 05:06:37 +00:00
|
|
|
id "net.minecrell.plugin-yml.bukkit" version "0.5.3"
|
2022-04-10 06:47:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2023-03-03 05:06:37 +00:00
|
|
|
library "org.projectlombok:lombok:1.18.26"
|
|
|
|
annotationProcessor "org.projectlombok:lombok:1.18.26"
|
|
|
|
library "org.json:json:20230227"
|
2022-04-10 06:47:33 +00:00
|
|
|
library "commons-io:commons-io:2.11.0"
|
2023-03-03 05:06:37 +00:00
|
|
|
library "dev.morphia.morphia:morphia-core:2.3.0"
|
2022-11-28 04:14:27 +00:00
|
|
|
library "redis.clients:jedis:4.3.1"
|
2023-03-03 05:06:37 +00:00
|
|
|
library "org.mariadb.jdbc:mariadb-java-client:3.1.2"
|
2022-04-10 06:47:33 +00:00
|
|
|
library "com.zaxxer:HikariCP:5.0.1"
|
2023-03-03 05:06:37 +00:00
|
|
|
library "org.apache.httpcomponents.client5:httpclient5:5.2.1"
|
2022-04-10 06:47:33 +00:00
|
|
|
library "org.apache.commons:commons-lang3:3.12.0"
|
2023-03-03 05:06:37 +00:00
|
|
|
library "org.apache.maven.resolver:maven-resolver-api:1.9.5"
|
|
|
|
library "org.apache.maven.resolver:maven-resolver-impl:1.9.5"
|
|
|
|
library "org.apache.maven.resolver:maven-resolver-connector-basic:1.9.5"
|
|
|
|
library "org.apache.maven.resolver:maven-resolver-transport-http:1.9.5"
|
|
|
|
library "org.apache.maven:maven-resolver-provider:3.9.0"
|
|
|
|
library "org.eclipse.jetty:jetty-server:11.0.14"
|
|
|
|
library "org.eclipse.jetty:jetty-servlet:11.0.14"
|
|
|
|
library "org.eclipse.jetty:jetty-proxy:11.0.14"
|
|
|
|
library "com.google.code.gson:gson:2.10.1"
|
|
|
|
compileOnly "io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT"
|
2022-06-29 23:11:03 +00:00
|
|
|
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") {
|
2022-04-11 17:56:26 +00:00
|
|
|
exclude group: "org.bukkit", module: "bukkit"
|
|
|
|
}
|
2023-03-03 05:06:37 +00:00
|
|
|
implementation "org.bstats:bstats-base:3.0.1"
|
|
|
|
implementation "org.bstats:bstats-bukkit:3.0.1"
|
2022-04-10 06:47:33 +00:00
|
|
|
}
|
|
|
|
|
2022-04-24 04:42:01 +00:00
|
|
|
group = rootProject.group
|
|
|
|
version = rootProject.version
|
|
|
|
description = "Plex-Server"
|
2022-04-09 05:14:36 +00:00
|
|
|
|
2022-04-10 06:47:33 +00:00
|
|
|
shadowJar {
|
2022-04-24 04:35:37 +00:00
|
|
|
archiveBaseName.set("Plex")
|
2022-04-10 22:27:46 +00:00
|
|
|
archiveClassifier.set("")
|
2022-04-10 06:47:33 +00:00
|
|
|
relocate "org.bstats", "dev.plex"
|
|
|
|
}
|
2022-01-04 03:53:22 +00:00
|
|
|
|
2022-04-10 06:47:33 +00:00
|
|
|
bukkit {
|
|
|
|
name = "Plex"
|
2022-04-24 04:16:14 +00:00
|
|
|
version = project.version
|
2022-04-10 06:47:33 +00:00
|
|
|
description = "Plex provides a new experience for freedom servers."
|
|
|
|
main = "dev.plex.Plex"
|
|
|
|
website = "https://plex.us.org"
|
2022-04-20 02:16:19 +00:00
|
|
|
authors = ["Telesphoreo", "taahanis", "supernt"]
|
2023-03-08 06:29:14 +00:00
|
|
|
// Load BukkitTelnet and LibsDisguises before Plex so the modules register properly
|
|
|
|
softDepend = ["BukkitTelnet", "LibsDisguises", "Vault"]
|
2022-04-10 06:47:33 +00:00
|
|
|
apiVersion = "1.18"
|
|
|
|
}
|
2022-03-26 22:22:08 +00:00
|
|
|
|
2022-04-10 06:47:33 +00:00
|
|
|
String getGitHash() {
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
try {
|
|
|
|
exec {
|
|
|
|
commandLine "git", "rev-parse", "--short", "HEAD"
|
|
|
|
standardOutput = stdout
|
|
|
|
ignoreExitValue = true
|
|
|
|
}
|
|
|
|
} catch (GradleException e) {
|
|
|
|
logger.error("Couldn't determine Git head because Git is not installed. " + e.getMessage())
|
2022-04-10 04:51:27 +00:00
|
|
|
}
|
2022-04-10 06:47:33 +00:00
|
|
|
return stdout.size() > 0 ? stdout.toString().trim() : "unknown"
|
|
|
|
}
|
2022-03-26 22:22:08 +00:00
|
|
|
|
2022-04-10 06:47:33 +00:00
|
|
|
String getBuildNumber() {
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
try {
|
|
|
|
exec {
|
|
|
|
commandLine "git", "rev-list", "HEAD", "--count"
|
|
|
|
standardOutput = stdout
|
|
|
|
ignoreExitValue = true
|
|
|
|
}
|
|
|
|
} catch (GradleException e) {
|
|
|
|
logger.error("Couldn't determine build number because Git is not installed. " + e.getMessage())
|
2022-03-26 21:36:29 +00:00
|
|
|
}
|
2022-04-10 06:47:33 +00:00
|
|
|
return stdout.size() ? stdout.toString().trim() + " (local)" : "unknown"
|
|
|
|
}
|
2022-03-26 21:36:29 +00:00
|
|
|
|
2022-04-10 06:47:33 +00:00
|
|
|
static def getDate() {
|
2022-04-10 23:30:21 +00:00
|
|
|
return new Date().format("MM/dd/yyyy '<light_purple>at<gold>' hh:mm:ss a z")
|
2022-04-10 06:47:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
task buildProperties {
|
2022-04-24 04:16:14 +00:00
|
|
|
ant.propertyfile(file: "$project.projectDir/src/main/resources/build.properties") {
|
2022-04-10 06:47:33 +00:00
|
|
|
entry(key: "buildAuthor", default: System.getenv("JENKINS_URL") != null ? "jenkins" : "unknown")
|
|
|
|
entry(key: "buildNumber", value: System.getenv("JENKINS_URL") != null ? System.getenv("BUILD_NUMBER") + " (Jenkins)" : getBuildNumber())
|
|
|
|
entry(key: "buildDate", value: getDate())
|
|
|
|
entry(key: "buildHead", value: getGitHash())
|
2022-04-10 04:51:27 +00:00
|
|
|
}
|
2022-04-10 06:47:33 +00:00
|
|
|
}
|
2022-01-04 03:53:22 +00:00
|
|
|
|
2022-04-10 06:47:33 +00:00
|
|
|
tasks {
|
|
|
|
build {
|
|
|
|
dependsOn(shadowJar)
|
|
|
|
finalizedBy(buildProperties)
|
|
|
|
}
|
|
|
|
|
2022-04-24 04:35:37 +00:00
|
|
|
jar {
|
|
|
|
enabled = false
|
|
|
|
}
|
|
|
|
|
2022-04-24 05:43:54 +00:00
|
|
|
shadowJar {
|
|
|
|
finalizedBy(rootProject.tasks.copyJars)
|
|
|
|
}
|
|
|
|
|
2022-04-10 06:47:33 +00:00
|
|
|
javadoc {
|
|
|
|
options.memberLevel = JavadocMemberLevel.PRIVATE
|
|
|
|
}
|
2022-04-24 05:01:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
maven(MavenPublication) {
|
|
|
|
pom.withXml {
|
|
|
|
def dependenciesNode = asNode().appendNode("dependencies")
|
|
|
|
configurations.getByName("library").getAllDependencies().each { dependency ->
|
|
|
|
dependenciesNode.appendNode("dependency").with {
|
|
|
|
it.appendNode("groupId", dependency.group)
|
|
|
|
it.appendNode("artifactId", dependency.name)
|
|
|
|
it.appendNode("version", dependency.version)
|
|
|
|
it.appendNode("scope", "provided")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
configurations.getByName("implementation").getAllDependencies().each { dependency ->
|
|
|
|
dependenciesNode.appendNode("dependency").with {
|
|
|
|
it.appendNode("groupId", dependency.group)
|
|
|
|
it.appendNode("artifactId", dependency.name)
|
|
|
|
it.appendNode("version", dependency.version)
|
|
|
|
it.appendNode("scope", "runtime")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-04-24 18:10:46 +00:00
|
|
|
artifacts = [shadowJar]
|
2022-04-24 05:01:19 +00:00
|
|
|
}
|
|
|
|
}
|
2022-02-22 01:03:51 +00:00
|
|
|
}
|