SR-Game/build.gradle.kts
unurled ced4c0d186
Some checks failed
Build / build (push) Failing after 1m19s
add of SR-Core and many more things
2024-09-06 09:29:26 +02:00

157 lines
No EOL
4.4 KiB
Kotlin

import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
plugins {
`java-library`
id("io.papermc.paperweight.userdev") version "1.7.2"
id("org.sonarqube") version "5.1.0.4882"
id("net.minecrell.plugin-yml.paper") version "0.6.0"
}
// from 1.20.5+ upward, spigot is not supported
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.1-R0.1-SNAPSHOT"
val redisVersion = "5.2.0-beta4"
val invuiVersion = "1.36"
val gsonVersion = "2.11.0"
val javaVersion = 21
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 = "unurled"
url = uri("https://repo.unurled.me/releases")
}
}
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", "2.4.0")
paperLibrary("me.unurled", "SR-Core", "0.1.0")
}
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."
}
}
}