Skip to content

Commit 786feab

Browse files
committed
chore: update to new maven central publishing api
1 parent 7def2e7 commit 786feab

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

build.gradle.kts

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33

44
`maven-publish`
55
signing
6-
alias(libs.plugins.nexuspublish)
6+
alias(libs.plugins.nmcp.aggregation)
77
}
88

99
group = "dev.hollowcube"
@@ -27,26 +27,22 @@ java {
2727
withSourcesJar()
2828
withJavadocJar()
2929

30-
sourceCompatibility = JavaVersion.VERSION_21
31-
targetCompatibility = JavaVersion.VERSION_21
30+
toolchain.languageVersion = JavaLanguageVersion.of(21)
3231
}
3332

3433
tasks.test {
3534
useJUnitPlatform()
3635
}
3736

38-
nexusPublishing {
39-
this.packageGroup.set("dev.hollowcube")
40-
41-
repositories.sonatype {
42-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
43-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
44-
45-
if (System.getenv("SONATYPE_USERNAME") != null) {
46-
username.set(System.getenv("SONATYPE_USERNAME"))
47-
password.set(System.getenv("SONATYPE_PASSWORD"))
48-
}
37+
nmcpAggregation {
38+
centralPortal {
39+
username = System.getenv("SONATYPE_USERNAME")
40+
password = System.getenv("SONATYPE_PASSWORD")
41+
publishingType = "AUTOMATIC"
4942
}
43+
44+
// Its fine we dont use multiple projects
45+
publishAllProjectsProbablyBreakingProjectIsolation()
5046
}
5147

5248
publishing.publications.create<MavenPublication>("maven") {

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ slf4j = "2.0.16"
66
gson = "2.12.1"
77
junit = "5.10.0"
88

9-
nexuspublish = "1.3.0"
9+
nmcp = "1.0.0-rc.1"
1010

1111
[libraries]
1212
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }
@@ -16,4 +16,4 @@ gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
1616
junit = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit" }
1717

1818
[plugins]
19-
nexuspublish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexuspublish" }
19+
nmcp-aggregation = { id = "com.gradleup.nmcp.aggregation", version.ref = "nmcp" }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Thu Feb 13 12:00:38 EST 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)