-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
109 lines (94 loc) · 2.38 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
108
109
plugins {
java
`maven-publish`
id("org.jetbrains.kotlin.jvm") version "1.9.22"
id("com.gradleup.shadow") version "8.3.0"
id("org.jetbrains.dokka") version "1.9.20"
}
group = "io.github.staticfx"
version = "1.1.5"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/") {
name = "papermc-repo"
}
maven("https://repo.codemc.io/repository/maven-public/") {
name = "CodeMC"
}
}
subprojects {
apply(plugin = "org.jetbrains.dokka")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
shadow("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/StaticFX/KIA")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
create<MavenPublication>("maven") {
from(components["java"])
groupId = "io.github.staticfx"
artifactId = "kia"
version = rootProject.version.toString()
pom {
name.set("KIA")
description.set("Kotlin inventory API for MC")
url.set("https://github.com/StaticFX/KIA")
licenses {
license {
name.set("GNU GENERAL PUBLIC LICENSE")
url.set("https://www.gnu.org/licenses/gpl-3.0.de.html")
}
}
developers {
developer {
id.set("staticfx")
name.set("StaticFX")
email.set("[email protected]")
}
}
}
}
}
}
tasks.register("printVersion") {
doLast {
println(rootProject.version.toString())
}
}
tasks {
shadowJar {
minimize()
relocate("de.tr7zw.changeme.nbtapi", "de.staticred.kia.nbtapi")
}
build {
dependsOn(shadowJar)
}
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
sourceSets {
named("main") {
kotlin.srcDir("src/main/kotlin")
}
}
kotlin {
jvmToolchain(21)
}