nicko/build.gradle.kts

136 lines
4.4 KiB
Text
Raw Normal View History

plugins {
id("java")
2024-05-16 21:09:56 +02:00
id("io.github.goooler.shadow") version "8.1.7"
2024-06-07 22:38:57 +02:00
id("xyz.jpenilla.run-paper") version "2.3.0"
}
group = "xyz.ineanto"
2024-05-16 21:09:56 +02:00
version = "1.1.8"
2023-12-11 13:21:30 +01:00
java {
2024-05-16 21:09:56 +02:00
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
2023-12-11 13:21:30 +01:00
toolchain {
2024-05-16 21:09:56 +02:00
languageVersion = JavaLanguageVersion.of(21)
2023-12-11 13:21:30 +01:00
}
}
repositories {
mavenCentral()
mavenLocal()
maven { url = uri("https://jitpack.io") }
maven {
name = "xenondevs"
url = uri("https://repo.xenondevs.xyz/releases")
}
maven {
name = "papermc"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
maven {
name = "codemc"
url = uri("https://repo.codemc.io/repository/maven-snapshots/")
}
maven {
name = "placeholderapi"
url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
}
}
dependencies {
2024-05-16 21:09:56 +02:00
// Nicko
compileOnly("io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT")
compileOnly("com.github.dmulloy2:ProtocolLib:master-SNAPSHOT")
2024-05-16 21:09:56 +02:00
compileOnly("me.clip:placeholderapi:2.11.5")
2024-06-07 22:38:57 +02:00
compileOnly("net.kyori:adventure-api:4.17.0")
2024-06-07 22:38:57 +02:00
implementation("xyz.xenondevs.invui:invui:1.31")
2024-05-16 21:09:56 +02:00
implementation("net.wesjd:anvilgui:1.9.4-SNAPSHOT")
implementation("com.github.jsixface:yamlconfig:1.2")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2")
implementation("com.fasterxml.jackson.core:jackson-core:2.15.2")
implementation("com.mysql:mysql-connector-j:8.2.0")
implementation("org.mariadb.jdbc:mariadb-java-client:3.3.1")
implementation("redis.clients:jedis:5.1.2")
implementation("com.google.code.gson:gson:2.10.1")
implementation("org.bstats:bstats-bukkit:3.0.2")
2024-06-07 22:38:57 +02:00
testImplementation("com.github.seeseemelk:MockBukkit-v1.20:3.89.0")
2024-05-04 14:26:32 +02:00
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.10.2")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
}
2023-12-19 14:31:15 +01:00
tasks {
processResources {
from("src/main/resources")
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
filesMatching("*.yml") {
2023-12-19 14:31:15 +01:00
expand("version" to version)
}
}
2023-12-19 14:31:15 +01:00
shadowJar {
2023-12-11 12:31:44 +01:00
// NAMING
archiveBaseName.set("nicko")
archiveVersion.set(version.toString())
archiveAppendix.set("")
archiveClassifier.set("")
// RELOCATIONS
relocate("xyz.xenondevs", "xyz.ineanto.nicko.libs.invui")
relocate("me.clip", "xyz.ineanto.nicko.libs.placeholderapi")
relocate("net.wesjd", "xyz.ineanto.nicko.libs.anvilgui")
relocate("com.github.jsixface", "xyz.ineanto.nicko.libs.yaml")
relocate("com.fasterxml.jackson.dataformat", "xyz.ineanto.nicko.libs.jackson.yaml")
relocate("com.fasterxml.jackson.core", "xyz.ineanto.nicko.libs.jackson.core")
relocate("com.mysql", "xyz.ineanto.nicko.libs.mysql")
relocate("org.mariadb.jdbc", "xyz.ineanto.nicko.libs.mariadb")
relocate("redis.clients", "xyz.ineanto.nicko.libs.redis")
relocate("com.google.gson", "xyz.ineanto.nicko.libs.gson")
relocate("org.apache.commons.pool2", "xyz.ineanto.nicko.libs.pool2")
2023-12-11 13:02:32 +01:00
relocate("org.bstats", "xyz.ineanto.nicko.libs.bstats")
2023-12-11 12:31:44 +01:00
// EXCLUSIONS
exclude("colors.bin")
exclude("waffle/**")
exclude("com/sun/**")
exclude("com/google/protobuf/**")
exclude("com/google/errorprone/**")
exclude("org/apache/commons/logging/**")
exclude("org/jetbrains/**")
exclude("org/intellij/**")
exclude("org/checkerframework/**")
exclude("org/json/**")
exclude("org/slf4j/**")
exclude("org/yaml/**")
exclude("google/protobuf/**")
exclude("net/kyori/**")
2023-12-11 12:31:44 +01:00
// MINIFY
minimize {
exclude(dependency("xyz.xenondevs.invui:.*"))
exclude(dependency("net.wesjd:.*"))
2023-12-21 00:16:19 +01:00
exclude(dependency("org.bstats:.*"))
2023-12-11 12:31:44 +01:00
}
}
2023-12-19 14:31:15 +01:00
2023-12-22 14:57:24 +01:00
jar {
enabled = false
}
test {
useJUnitPlatform()
}
2023-12-19 14:31:15 +01:00
runServer {
2023-12-28 21:02:09 +01:00
dependsOn(shadowJar)
2023-12-19 14:31:15 +01:00
downloadPlugins {
2024-05-04 14:26:32 +02:00
url("https://download.luckperms.net/1539/bukkit/loader/LuckPerms-Bukkit-5.4.126.jar")
2024-06-08 13:12:48 +02:00
url("https://ci.dmulloy2.net/job/ProtocolLib/lastSuccessfulBu²ild/artifact/build/libs/ProtocolLib.jar")
2023-12-19 14:31:15 +01:00
}
2024-06-08 13:12:48 +02:00
minecraftVersion("1.20.6")
2023-12-21 17:40:57 +01:00
}
2023-12-22 14:57:24 +01:00
}