diff --git a/build.gradle.kts b/build.gradle.kts index d70c18c..7241b8f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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" @@ -45,3 +47,21 @@ configure { } } } + +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"]) +} \ No newline at end of file