Skip to content

Commit 1cbdf44

Browse files
committed
Copy some of the publishing process from Minestom
1 parent c61bcb4 commit 1cbdf44

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

build.gradle.kts

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,35 @@ configure<PublishingExtension> {
4949
}
5050

5151
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/"))
52+
useStaging.set(true)
53+
this.packageGroup.set("net.goldenstack")
5654

57-
if (System.getenv("SONATYPE_USERNAME") != null) {
58-
username.set(System.getenv("SONATYPE_USERNAME"))
59-
password.set(System.getenv("SONATYPE_PASSWORD"))
55+
repositories.sonatype {
56+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
57+
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
6058

61-
println("---\n".repeat(10))
62-
}
59+
if (System.getenv("SONATYPE_USERNAME") != null) {
60+
username.set(System.getenv("SONATYPE_USERNAME"))
61+
password.set(System.getenv("SONATYPE_PASSWORD"))
62+
63+
println("---\n".repeat(10))
6364
}
6465
}
6566
}
6667

68+
publishing.publications.create<MavenPublication>("maven") {
69+
groupId = "net.goldenstack"
70+
artifactId = "trove"
71+
version = project.version.toString()
72+
73+
from(project.components["java"])
74+
75+
pom {
76+
name.set(this@create.artifactId)
77+
url.set("https://github.com/goldenstack/trove")
78+
}
79+
}
80+
6781
signing {
6882
isRequired = System.getenv("CI") != null
6983

0 commit comments

Comments
 (0)