103 lines
2.8 KiB
Kotlin
103 lines
2.8 KiB
Kotlin
plugins {
|
|
java
|
|
`maven-publish`
|
|
id("com.gradleup.shadow") version "9.0.0-beta4"
|
|
id("io.papermc.paperweight.userdev") version "2.0.0-beta.10"
|
|
id("org.sonarqube") version "5.1.0.4882"
|
|
}
|
|
|
|
group = "me.unurled"
|
|
version = "0.2.0"
|
|
|
|
val mcVersion = "1.21.4-R0.1-SNAPSHOT"
|
|
val lampVersion = "4.0.0-beta.17"
|
|
|
|
val javaVersion = 23
|
|
|
|
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
paperweight.paperDevBundle(mcVersion)
|
|
implementation("io.github.revxrsal:lamp.common:${lampVersion}")
|
|
implementation("io.github.revxrsal:lamp.bukkit:${lampVersion}")
|
|
implementation("io.github.revxrsal:lamp.brigadier:${lampVersion}")
|
|
implementation("io.github.revxrsal:lamp.paper:${lampVersion}")
|
|
}
|
|
|
|
java {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(javaVersion)
|
|
}
|
|
|
|
tasks {
|
|
compileJava {
|
|
options.release.set(javaVersion)
|
|
sourceCompatibility = javaVersion.toString()
|
|
targetCompatibility = javaVersion.toString()
|
|
}
|
|
sonar {
|
|
properties {
|
|
property("sonar.projectKey", "SR-Core")
|
|
property("sonar.host.url", "https://qube.unurled.me")
|
|
}
|
|
}
|
|
javadoc {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
|
|
}
|
|
shadowJar {
|
|
archiveClassifier.set("")
|
|
}
|
|
}
|
|
|
|
tasks.register<Jar>("sourcesJar") {
|
|
archiveClassifier.set("sources")
|
|
from(sourceSets["main"].allSource)
|
|
}
|
|
|
|
tasks.register<Jar>("javadocJar") {
|
|
archiveClassifier.set("javadoc")
|
|
from(tasks.named("javadoc"))
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
name = "repounurledme"
|
|
url = uri("https://repo.unurled.me/releases")
|
|
credentials(PasswordCredentials::class)
|
|
authentication {
|
|
create<BasicAuthentication>("basic")
|
|
}
|
|
}
|
|
}
|
|
publications {
|
|
create<MavenPublication>("mavenJava") {
|
|
artifact(tasks.shadowJar.get()) {
|
|
classifier = ""
|
|
}
|
|
|
|
artifact(tasks.named("sourcesJar").get())
|
|
artifact(tasks.named("javadocJar").get())
|
|
|
|
pom {
|
|
name.set(project.name)
|
|
description.set(project.description)
|
|
developers {
|
|
developer {
|
|
name.set("unurled")
|
|
email.set("dev@unurled.me")
|
|
}
|
|
}
|
|
scm {
|
|
connection.set("scm:git:git://git.unurled.me/SacredRealms/SR-Core.git")
|
|
developerConnection.set("scm:git:ssh://git.unurled.me:SacredRealms/SR-Core.git")
|
|
url.set("https://git.unurled.me/SacredRealms/SR-Core")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|