Skip to content

Commit dec6d1d

Browse files
committed
Add signing and publishing
1 parent 30d0af3 commit dec6d1d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

build.gradle.kts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
plugins {
22
id("java-library")
33
id("maven-publish")
4+
id("signing")
5+
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
46
}
57

68
group = "net.goldenstack.loot"
@@ -45,3 +47,21 @@ configure<PublishingExtension> {
4547
}
4648
}
4749
}
50+
51+
nexusPublishing {
52+
repositories {
53+
sonatype {
54+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
55+
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
56+
57+
if (System.getenv("SONATYPE_USERNAME") != null) {
58+
username.set(System.getenv("SONATYPE_USERNAME"))
59+
password.set(System.getenv("SONATYPE_PASSWORD"))
60+
}
61+
}
62+
}
63+
}
64+
65+
signing {
66+
sign(publishing.publications["mavenJava"])
67+
}

0 commit comments

Comments
 (0)