Skip to content

Commit 1719a3c

Browse files
committed
Use other plugin to publish maven central
1 parent a93b977 commit 1719a3c

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

build.gradle.kts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
id("java")
33
`maven-publish`
44
signing
5+
id("org.danilopianini.publish-on-central") version "8.0.6"
56
id("me.champeau.jmh") version "0.7.3"
67
}
78

@@ -118,21 +119,14 @@ publishing {
118119
password = System.getenv("GPR_KEY")
119120
}
120121
}
121-
122-
maven {
123-
url = if (rootProject.version.toString().endsWith("SNAPSHOT")) {
124-
uri("https://s01.oss.sonatype.org/content/repositories/snapshots")
125-
} else {
126-
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
127-
}
128-
credentials {
129-
username = System.getenv("MAVEN_CENTRAL_USERNAME")
130-
password = System.getenv("MAVEN_CENTRAL_PASSWORD")
131-
}
132-
}
133122
}
134123
}
135124

125+
publishOnCentral {
126+
mavenCentral.user.set(System.getenv("MAVEN_CENTRAL_USERNAME"))
127+
mavenCentral.password.set(System.getenv("MAVEN_CENTRAL_PASSWORD"))
128+
}
129+
136130
signing {
137131
useInMemoryPgpKeys(
138132
System.getenv("SIGNING_KEY_ID"),

0 commit comments

Comments
 (0)