Skip to content

Commit

Permalink
Add signing and publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenStack committed Aug 28, 2024
1 parent 30d0af3 commit dec6d1d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
id("java-library")
id("maven-publish")
id("signing")
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}

group = "net.goldenstack.loot"
Expand Down Expand Up @@ -45,3 +47,21 @@ configure<PublishingExtension> {
}
}
}

nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))

if (System.getenv("SONATYPE_USERNAME") != null) {
username.set(System.getenv("SONATYPE_USERNAME"))
password.set(System.getenv("SONATYPE_PASSWORD"))
}
}
}
}

signing {
sign(publishing.publications["mavenJava"])
}

0 comments on commit dec6d1d

Please sign in to comment.