2022-01-04 03:53:22 +00:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
|
|
|
id 'maven-publish'
|
|
|
|
id 'net.minecrell.plugin-yml.bukkit' version '0.5.1'
|
2022-01-27 09:00:50 +00:00
|
|
|
id "com.github.johnrengelman.shadow" version "7.1.2"
|
2022-01-04 03:53:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
maven {
|
|
|
|
url = uri('https://papermc.io/repo/repository/maven-public/')
|
|
|
|
}
|
|
|
|
|
|
|
|
maven {
|
|
|
|
url = uri('https://repository.apache.org/content/repositories/snapshots/')
|
|
|
|
}
|
|
|
|
|
|
|
|
maven {
|
|
|
|
url = uri('https://repo.maven.apache.org/maven2/')
|
|
|
|
}
|
2022-02-04 08:18:07 +00:00
|
|
|
mavenCentral()
|
2022-01-04 03:53:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
library 'org.projectlombok:lombok:1.18.22'
|
|
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.22'
|
|
|
|
library 'org.json:json:20211205'
|
|
|
|
library 'commons-io:commons-io:2.11.0'
|
|
|
|
library 'dev.morphia.morphia:morphia-core:2.2.3'
|
2022-02-04 18:51:16 +00:00
|
|
|
library 'redis.clients:jedis:4.1.1'
|
2022-01-04 03:53:22 +00:00
|
|
|
library 'org.mariadb.jdbc:mariadb-java-client:2.7.4'
|
2022-01-27 21:24:32 +00:00
|
|
|
library 'org.apache.httpcomponents:httpclient:4.5.13'
|
2022-01-04 03:53:22 +00:00
|
|
|
compileOnly 'io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT'
|
2022-02-01 06:31:06 +00:00
|
|
|
implementation 'org.bstats:bstats-base:3.0.0'
|
|
|
|
implementation 'org.bstats:bstats-bukkit:3.0.0'
|
2022-01-04 03:53:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group = 'dev.plex'
|
2022-02-22 07:29:08 +00:00
|
|
|
version = '0.5'
|
2022-01-04 03:53:22 +00:00
|
|
|
description = 'Plex'
|
|
|
|
|
2022-01-27 09:00:50 +00:00
|
|
|
shadowJar {
|
|
|
|
archiveClassifier.set("")
|
2022-02-01 06:31:06 +00:00
|
|
|
relocate 'org.bstats', 'dev.plex'
|
2022-01-27 09:00:50 +00:00
|
|
|
}
|
|
|
|
|
2022-01-04 03:53:22 +00:00
|
|
|
bukkit {
|
|
|
|
name = "Plex"
|
|
|
|
version = rootProject.version
|
|
|
|
description = "Plex provides a new experience for freedom servers."
|
|
|
|
main = "dev.plex.Plex"
|
|
|
|
website = "https://telesphoreo.me"
|
|
|
|
authors = ["Telesphoreo", "taahanis", "super"]
|
|
|
|
apiVersion = "1.18"
|
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
maven(MavenPublication) {
|
|
|
|
from(components.java)
|
|
|
|
}
|
2022-02-22 02:19:41 +00:00
|
|
|
plexReleases(MavenPublication) {
|
|
|
|
from(components.java)
|
2022-02-22 01:03:51 +00:00
|
|
|
repositories {
|
|
|
|
maven {
|
2022-02-22 06:59:20 +00:00
|
|
|
url("https://nexus.telesphoreo.me/repository/plex-releases/")
|
2022-02-22 06:40:31 +00:00
|
|
|
credentials {
|
|
|
|
username = System.getenv("plex_repo_user")
|
|
|
|
password = System.getenv("plex_repo_pass")
|
2022-02-22 01:03:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-02-22 02:19:41 +00:00
|
|
|
plexSnapshots(MavenPublication) {
|
|
|
|
from(components.java)
|
2022-02-22 01:03:51 +00:00
|
|
|
repositories {
|
|
|
|
maven {
|
2022-02-22 06:59:20 +00:00
|
|
|
url("https://nexus.telesphoreo.me/repository/plex-snapshots/")
|
2022-02-22 06:40:31 +00:00
|
|
|
credentials {
|
|
|
|
username = System.getenv("plex_repo_user")
|
|
|
|
password = System.getenv("plex_repo_pass")
|
2022-02-22 01:03:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-02-22 02:19:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.encoding = 'UTF-8'
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
build {
|
|
|
|
dependsOn(shadowJar)
|
2022-02-22 06:40:31 +00:00
|
|
|
if (System.getenv("plex_repo_user") != null && System.getenv("plex_repo_pass") != null) {
|
|
|
|
if (getVersion().toString().toLowerCase().endsWith("-snapshot")) {
|
|
|
|
dependsOn(publishPlexSnapshotsPublicationToMaven2Repository)
|
2022-02-22 07:33:15 +00:00
|
|
|
} else {
|
|
|
|
dependsOn(publishPlexReleasesPublicationToMavenRepository)
|
2022-02-22 06:40:31 +00:00
|
|
|
}
|
2022-02-22 02:35:17 +00:00
|
|
|
}
|
2022-02-22 02:19:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
javadoc {
|
|
|
|
options.memberLevel = JavadocMemberLevel.PRIVATE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task publishRelease {
|
|
|
|
dependsOn(publishPlexReleasesPublicationToMavenRepository)
|
|
|
|
}
|
|
|
|
|
|
|
|
task publishSnapshot {
|
|
|
|
dependsOn(publishPlexSnapshotsPublicationToMaven2Repository)
|
2022-02-22 01:03:51 +00:00
|
|
|
}
|