-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
106 lines (89 loc) · 2.77 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
import java.util.*
plugins {
id("java-library")
id("java")
id("io.github.goooler.shadow") version "8.1.8"
id("maven-publish")
signing
}
group = "io.github.kapimc"
version = "0.2.1"
description = "A powerful, easy-to-use, and flexible framework for making Spigot Plugins."
repositories {
mavenLocal()
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/groups/public/")
}
dependencies {
api("dev.triumphteam:triumph-gui:3.1.10")
api("org.jspecify:jspecify:1.0.0")
api("org.jetbrains:annotations:24.1.0")
implementation("org.xerial:sqlite-jdbc:3.46.0.0")
compileOnly("org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.3")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.2")
}
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
java {
withSourcesJar()
withJavadocJar()
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.withType<Javadoc> {
options.encoding = "UTF-8"
}
tasks.shadowJar {
relocate("dev.triumphteam.gui", "io.github.kapimc.kapi.gui")
archiveClassifier.set("") // Remove the "-all" suffix jars
}
tasks.test {
useJUnitPlatform() // This tells Gradle to use JUnit 5.
}
publishing.publications.create<MavenPublication>("maven") {
from(components["java"])
pom {
name.set("Kapi")
description.set("A powerful, easy-to-use, and flexible framework for making Spigot Plugins.")
url.set("https://github.com/kapimc/kapi")
licenses {
license {
name.set("GPLv3 License")
url.set("https://www.gnu.org/licenses/gpl-3.0")
}
}
developers {
developer {
id.set("kyren")
name.set("Kyren223")
organization.set("KapiMC")
organizationUrl.set("https://github.com/kapimc")
}
}
scm {
connection.set("scm:git:git://github.com/kapimc/kapi.git")
developerConnection.set("scm:git:ssh://github.com:kapimc/kapi.git")
url.set("https://github.com/kapimc/kapi")
}
issueManagement {
system.set("GitHub")
url.set("https://github.com/kapimc/kapi/issues")
}
}
}
publishing.repositories {
mavenLocal()
}
tasks {
signing {
// useInMemoryPgpKeys(
// System.getenv("GPG_KEY"),
// Base64.getEncoder().encodeToString(file("kapi_publishing_keyring.gpg").readBytes()),
// System.getenv("GPG_PASSPHRASE")
// )
sign(publishing.publications["maven"])
}
}