SR-Game/build.gradle.kts
unurled a3fbcbf32a
Some checks failed
Build / build (push) Failing after 56s
Format / formatting (push) Failing after 1m2s
fix: switch to 2.0 invui and translation
2025-06-25 23:18:12 +02:00

166 lines
No EOL
4.7 KiB
Kotlin

import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
plugins {
`java-library`
id("io.papermc.paperweight.userdev") version "2.0.0-beta.17"
id("org.sonarqube") version "6.0.1.5171"
id("de.eldoria.plugin-yml.paper") version "0.6.0"
}
paperweight.reobfArtifactConfiguration =
io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
group = "me.unurled.sacredrealms"
version = "0.1.0"
description = "The main SR plugin."
val mcVersion = "1.21.4-R0.1-SNAPSHOT"
val redisVersion = "5.2.0-beta4"
val invuiVersion = "2.0.0-alpha.14"
val gsonVersion = "2.11.0"
val packeteventsVersion = "2.7.0"
val znpcsPlusVersion = "2.1.0-SNAPSHOT"
val javaVersion = 23
repositories {
mavenCentral()
maven {
name = "invui"
url = uri("https://repo.xenondevs.xyz/releases/")
}
maven {
name = "packetevents"
url = uri("https://repo.codemc.io/repository/maven-releases/")
}
maven {
name = "cubbossa"
url = uri("https://nexus.leonardbausenwein.de/repository/maven-releases/")
}
// ZNPCsPlus
maven {
name = "pyrSnapshots"
url = uri("https://repo.pyr.lol/snapshots")
}
}
dependencies {
paperweight.paperDevBundle(mcVersion)
compileOnly("xyz.xenondevs.invui:invui:${invuiVersion}")
paperLibrary("com.google.code.gson", "gson", gsonVersion)
paperLibrary("redis.clients", "jedis", redisVersion)
paperLibrary("com.github.retrooper", "packetevents-spigot", packeteventsVersion)
paperLibrary("lol.pyr", "znpcsplus-api", znpcsPlusVersion)
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(javaVersion))
}
tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(javaVersion)
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
sonar {
properties {
property("sonar.projectKey", "Sacred-Realms")
property("sonar.host.url", "https://qube.unurled.me")
}
}
}
paper {
main = "me.unurled.sacredrealms.sr.SR"
bootstrapper = "me.unurled.sacredrealms.sr.SRBootstrap"
loader = "me.unurled.sacredrealms.sr.SRLoader"
hasOpenClassloader = false
generateLibrariesJson = true
foliaSupported = false
apiVersion = "1.21"
load = BukkitPluginDescription.PluginLoadOrder.STARTUP
author = "unurled"
prefix = "SR"
defaultPermission = BukkitPluginDescription.Permission.Default.OP
permissions {
register("sr.*") {
children = listOf(
"sr.tutorial",
"sr.spawn",
"sr.attributes",
"sr.clientbuild",
"sr.level",
"sr.entitytype",
"sr.spawnentity",
"sr.admin.item",
"sr.resetadventure",
"sr.treasure.manage",
"sr.difficulty.*",
"sr.cutscene.*"
)
description = "Gives access to all Sacred Realms permissions."
}
register("sr.tutorial") {
description = "Gives access to the tutorial command."
default = BukkitPluginDescription.Permission.Default.NOT_OP
}
register("sr.spawn") {
description = "Gives access to the spawn command."
default = BukkitPluginDescription.Permission.Default.NOT_OP
}
register("sr.attributes") {
description = "Gives access to the attributes command."
}
register("sr.clientbuild") {
description = "Gives access to the clientbuild command."
}
register("sr.level") {
description = "Gives access to the level command."
}
register("sr.entitytype") {
description = "Gives access to the entitytype command."
}
register("sr.spawnentity") {
description = "Gives access to the spawnentity command."
}
register("sr.admin.item") {
description = "Gives access to the admin item command."
}
register("sr.resetadventure") {
description = "Gives access to the resetadventure command."
}
register("sr.treasure.manage") {
description = "Gives access to the treasure manage command."
}
register("sr.difficulty.*") {
description = "Gives access to all difficulty commands."
children = listOf(
"sr.difficulty.self",
"sr.difficulty.manage"
)
}
register("sr.cutscene") {
description = "Gives access to the cutscene command."
children = listOf(
"sr.cutscene.create",
"sr.cutscene.replay"
)
}
}
}