96 lines
2.2 KiB
Kotlin
96 lines
2.2 KiB
Kotlin
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
|
|
import org.gradle.internal.impldep.org.eclipse.jgit.api.ArchiveCommand
|
|
|
|
plugins {
|
|
`java-library`
|
|
`maven-publish`
|
|
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"
|
|
}
|
|
|
|
group = "me.unurled"
|
|
version = "0.1.0"
|
|
|
|
val mcVersion = "1.21.1-R0.1-SNAPSHOT"
|
|
|
|
val javaVersion = 21
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
paperweight.paperDevBundle(mcVersion)
|
|
}
|
|
|
|
java {
|
|
val targetVersion = JavaVersion.toVersion(javaVersion)
|
|
sourceCompatibility = targetVersion
|
|
targetCompatibility = targetVersion
|
|
if (JavaVersion.current() < targetVersion) {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(javaVersion)
|
|
}
|
|
withJavadocJar()
|
|
withSourcesJar()
|
|
}
|
|
|
|
tasks {
|
|
compileJava {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
|
|
if (javaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
|
|
options.release.set(javaVersion)
|
|
}
|
|
}
|
|
sonar {
|
|
properties {
|
|
property("sonar.projectKey", "SR-Core")
|
|
property("sonar.host.url", "https://qube.unurled.me")
|
|
}
|
|
}
|
|
javadoc {
|
|
if (JavaVersion.current().isJava9Compatible) {
|
|
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
name = "repounurledme"
|
|
url = uri("https://repo.unurled.me/releases")
|
|
credentials(PasswordCredentials::class)
|
|
authentication {
|
|
create<BasicAuthentication>("basic")
|
|
}
|
|
}
|
|
}
|
|
publications {
|
|
create<MavenPublication>("maven") {
|
|
groupId = project.group.toString()
|
|
artifactId = project.name
|
|
version = project.version.toString()
|
|
from(components["java"])
|
|
}
|
|
}
|
|
}
|
|
|
|
paper {
|
|
main = "me.unurled.sacredrealms.sr.SR"
|
|
|
|
hasOpenClassloader = false
|
|
|
|
foliaSupported = false
|
|
|
|
apiVersion = "1.21"
|
|
|
|
load = BukkitPluginDescription.PluginLoadOrder.STARTUP
|
|
author = "unurled"
|
|
|
|
prefix = "SR-Core"
|
|
|
|
defaultPermission = BukkitPluginDescription.Permission.Default.OP
|
|
}
|