-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
71 lines (61 loc) · 2.1 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
71 lines (61 loc) · 2.1 KB
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
plugins {
id("maven-publish")
id("signing")
id("com.gradleup.nmcp")
}
java {
withSourcesJar()
withJavadocJar()
}
dependencies {
testImplementation(platform("org.junit:junit-bom:6.0.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
configure<PublishingExtension> {
publications {
create<MavenPublication>("maven") {
artifactId = "votely-api"
from(components["java"])
pom {
name.set("votely-api")
description.set("Votely API - shared Vote model and channel constants for Minecraft plugin integration.")
url.set("https://github.com/CraftlyWorks/votely")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("CraftlyWorks")
name.set("CraftlyWorks")
email.set("contact@craftlyworks.com")
}
}
scm {
connection.set("scm:git:git://github.com/CraftlyWorks/votely.git")
developerConnection.set("scm:git:ssh://github.com/CraftlyWorks/votely.git")
url.set("https://github.com/CraftlyWorks/votely")
}
}
}
}
}
signing {
val signingKey = System.getenv("GPG_SIGNING_KEY")
val signingPassword = System.getenv("GPG_SIGNING_PASSWORD")
if (!signingKey.isNullOrBlank() && !signingPassword.isNullOrBlank()) {
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
} else {
logger.warn("GPG key or password not set — artifacts will not be signed.")
}
}
nmcp {
publishAllPublicationsToCentralPortal {
username.set(findProperty("centralUsername") as String)
password.set(findProperty("centralPassword") as String)
}
}