Files
gaming_core/build.gradle.kts
T

66 lines
1.9 KiB
Kotlin

plugins {
`java-library`
id("com.gradleup.shadow") version "8.3.6"
}
group = "fr.luc"
version = "1.0.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://jitpack.io")
}
dependencies {
// Paper API (1.20.4 gives access to modern Paper API while remaining cross-compatible)
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
// Adventure platform for Bukkit (cross-version RGB, MiniMessage, Titles, ActionBars)
implementation("net.kyori:adventure-platform-bukkit:4.3.4")
implementation("net.kyori:adventure-text-minimessage:4.17.0")
// XSeries for cross-version Materials, Sounds, Titles, Particles (1.16 - 1.21+)
implementation("com.github.cryptomorin:XSeries:13.0.0")
testImplementation(platform("org.junit:junit-bom:6.0.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(17)
}
tasks.shadowJar {
archiveClassifier.set("")
// Relocate shaded libraries to avoid collisions with other plugins
relocate("com.cryptomorin.xseries", "fr.luc.gamingcore.libs.xseries")
relocate("net.kyori.adventure.platform.bukkit", "fr.luc.gamingcore.libs.adventure.platform")
}
tasks.processResources {
val props = mapOf(
"name" to project.rootProject.name,
"version" to project.version,
"description" to "Core Gaming Minecraft Plugin",
"apiVersion" to "1.16"
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
}
}
tasks.build {
dependsOn(tasks.shadowJar)
}