81 lines
No EOL
2.1 KiB
Kotlin
81 lines
No EOL
2.1 KiB
Kotlin
plugins {
|
|
`java-library`
|
|
id("io.papermc.paperweight.userdev") version "1.7.1"
|
|
id("io.github.goooler.shadow") version "8.1.7"
|
|
id("org.sonarqube") version "4.4.1.3373"
|
|
}
|
|
|
|
// 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.20.6-R0.1-SNAPSHOT"
|
|
val redisVersion = "5.2.0-beta1"
|
|
val invuiVersion = "1.30"
|
|
|
|
val javaVersion = 21
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven("https://repo.xenondevs.xyz/releases")
|
|
}
|
|
|
|
dependencies {
|
|
paperweight.paperDevBundle(mcVersion)
|
|
|
|
implementation("redis.clients:jedis:${redisVersion}")
|
|
|
|
implementation("xyz.xenondevs.invui:invui:${invuiVersion}")
|
|
}
|
|
|
|
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()
|
|
}
|
|
processResources {
|
|
filteringCharset = Charsets.UTF_8.name()
|
|
val props = mapOf(
|
|
"name" to project.name,
|
|
"version" to project.version,
|
|
"description" to project.description,
|
|
"apiVersion" to "1.20"
|
|
)
|
|
inputs.properties(props)
|
|
filesMatching("plugin.yml") {
|
|
expand(props)
|
|
}
|
|
}
|
|
build {
|
|
dependsOn(shadowJar)
|
|
}
|
|
shadowJar {
|
|
archiveClassifier.set("")
|
|
relocate("com.google", "libs.com.google")
|
|
relocate("org.apache", "libs.org.apache")
|
|
relocate("org.intellij", "libs.org.intellij")
|
|
relocate("org.jetbrains", "libs.org.jetbrains")
|
|
relocate("org.json", "libs.org.json")
|
|
relocate("redis", "libs.redis")
|
|
relocate("xyz.xenondevs", "libs.xyz.xenondevs")
|
|
exclude("org.slf4j")
|
|
}
|
|
sonar {
|
|
properties {
|
|
property("sonar.projectKey", "Sacred-Realms")
|
|
property("sonar.host.url", "https://qube.unurled.me")
|
|
}
|
|
}
|
|
} |