Skip to content

Commit e86c5a7

Browse files
committed
Add signing configuration / build Javadoc Jar and Sources Jar
1 parent aa1ef23 commit e86c5a7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ version = "0.1"
1212

1313
java {
1414
toolchain.languageVersion = JavaLanguageVersion.of(17)
15+
withSourcesJar()
16+
withJavadocJar()
1517
}
1618

1719
tasks.compileJava {
@@ -65,6 +67,16 @@ publishing {
6567
}
6668
}
6769

70+
signing {
71+
if (providers.gradleProperty("sign").getOrElse("false").toBoolean()) {
72+
useInMemoryPgpKeys(
73+
providers.environmentVariable("SIGNING_KEY").getOrNull(),
74+
providers.environmentVariable("SIGNING_PASSPHRASE").getOrNull()
75+
)
76+
sign(publishing.publications["maven"])
77+
}
78+
}
79+
6880
nmcp {
6981
publish("maven") {
7082
username = providers.environmentVariable("MAVEN_CENTRAL_USERNAME")

0 commit comments

Comments
 (0)