SR-Game/build.gradle.kts
2024-03-18 20:26:39 +01:00

74 lines
No EOL
1.8 KiB
Kotlin

plugins {
`java-library`
id("io.papermc.paperweight.userdev") version "1.5.11"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.sonarqube") version "4.4.1.3373"
}
group = "me.unurled.sacredrealms"
version = "0.1.0"
description = "The main SR plugin."
val mcVersion = "1.20.4-R0.1-SNAPSHOT"
val redisVersion = "5.1.2"
val invuiVersion = "1.26"
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(17))
}
tasks {
assemble {
dependsOn(reobfJar)
}
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
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)
}
}
shadowJar {
archiveClassifier.set("")
relocate("com.google", "libs.com.google")
relocate("org.apache", "libs.org.apache")
relocate("org.json", "libs.org.json")
exclude("org.slf4j")
relocate("redis", "libs.redis")
// minimize()
}
sonar {
properties {
property("sonar.projectKey", "Sacred-Realms")
property("sonar.host.url", "https://qube.unurled.me")
}
}
}