-
Notifications
You must be signed in to change notification settings - Fork 33
/
build.gradle.kts
107 lines (83 loc) · 2.57 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val githubRepo = "jakobkmar/KSpigot"
group = "net.axay"
version = "1.21.0"
description = "A Kotlin API for Minecraft plugins using the Spigot or Paper toolchain"
plugins {
kotlin("jvm") version "1.9.24"
kotlin("plugin.serialization") version "1.9.24"
`java-library`
`maven-publish`
signing
id("org.jetbrains.dokka") version "1.9.20"
id("io.papermc.paperweight.userdev") version "1.7.2"
}
repositories {
mavenCentral()
}
dependencies {
paperweight.paperDevBundle("1.21-R0.1-SNAPSHOT")
api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
api("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.8.1")
}
paperweight {
reobfArtifactConfiguration = io.papermc.paperweight.userdev
.ReobfArtifactConfiguration.MOJANG_PRODUCTION
}
tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(21)
}
withType<KotlinCompile> {
compilerOptions.jvmTarget.set(JvmTarget.JVM_21)
}
dokkaHtml.configure {
outputDirectory.set(projectDir.resolve("docs"))
}
}
java {
withSourcesJar()
withJavadocJar()
}
signing {
sign(publishing.publications)
}
publishing {
repositories {
maven("https://oss.sonatype.org/service/local/staging/deploy/maven2") {
name = "ossrh"
credentials(PasswordCredentials::class)
}
}
publications {
register<MavenPublication>(project.name) {
from(components["java"])
this.groupId = project.group.toString()
this.artifactId = project.name.lowercase()
this.version = project.version.toString()
pom {
name.set(project.name)
description.set(project.description)
developers {
developer {
name.set("jakobkmar")
}
}
licenses {
license {
name.set("GNU General Public License, Version 3")
url.set("https://www.gnu.org/licenses/gpl-3.0.en.html")
}
}
url.set("https://github.com/${githubRepo}")
scm {
connection.set("scm:git:git://github.com/${githubRepo}.git")
url.set("https://github.com/${githubRepo}/tree/main")
}
}
}
}
}