Skip to content

Commit

Permalink
Copy some of the publishing process from Minestom
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenStack committed Jan 9, 2025
1 parent c61bcb4 commit 1cbdf44
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,35 @@ 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/"))
useStaging.set(true)
this.packageGroup.set("net.goldenstack")

if (System.getenv("SONATYPE_USERNAME") != null) {
username.set(System.getenv("SONATYPE_USERNAME"))
password.set(System.getenv("SONATYPE_PASSWORD"))
repositories.sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))

println("---\n".repeat(10))
}
if (System.getenv("SONATYPE_USERNAME") != null) {
username.set(System.getenv("SONATYPE_USERNAME"))
password.set(System.getenv("SONATYPE_PASSWORD"))

println("---\n".repeat(10))
}
}
}

publishing.publications.create<MavenPublication>("maven") {
groupId = "net.goldenstack"
artifactId = "trove"
version = project.version.toString()

from(project.components["java"])

pom {
name.set(this@create.artifactId)
url.set("https://github.com/goldenstack/trove")
}
}

signing {
isRequired = System.getenv("CI") != null

Expand Down

0 comments on commit 1cbdf44

Please sign in to comment.