@@ -6,7 +6,7 @@ plugins {
66 id ' java-library'
77 id ' maven-publish'
88 id ' signing'
9- id ' io.codearte. nexus-staging ' version ' 0.30 .0'
9+ id ' io.github.gradle- nexus.publish-plugin ' version ' 2.0 .0'
1010 id ' jacoco'
1111}
1212
@@ -70,8 +70,9 @@ publishing {
7070 }
7171 repositories {
7272 maven {
73- def releasesRepoUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2"
74- def snapshotsRepoUrl = " https://oss.sonatype.org/content/repositories/snapshots"
73+ name = " sonatype"
74+ def releasesRepoUrl = " https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/"
75+ def snapshotsRepoUrl = " https://central.sonatype.com/repository/maven-snapshots/"
7576 url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
7677
7778 credentials {
@@ -82,13 +83,17 @@ publishing {
8283 }
8384}
8485
85- nexusStaging {
86- packageGroup = ' org.cip4'
87- stagingProfileId = ' 105e2b532689c6'
88- numberOfRetries = 400
89- delayBetweenRetriesInMillis = 2500
90- username ossrhUsername
91- password ossrhPassword
86+ nexusPublishing {
87+ repositories {
88+ sonatype {
89+ nexusUrl. set(uri(" https://ossrh-staging-api.central.sonatype.com/service/local/" ))
90+ snapshotRepositoryUrl. set(uri(" https://central.sonatype.com/repository/maven-snapshots/" ))
91+ username = ossrhUsername
92+ password = ossrhPassword
93+ stagingProfileId = ' 105e2b532689c6' // This can often be omitted if your packageGroup is unique
94+ packageGroup = ' org.cip4'
95+ }
96+ }
9297}
9398
9499repositories {
@@ -154,6 +159,7 @@ test {
154159jar {
155160 manifest {
156161 attributes(
162+ " Implementation-Build-Date" : new Date (). format(" yyyy-MM-dd'T'HH:mm:ssZ" ),
157163 " Implementation-Title" : project. description,
158164 " Implementation-Version" : project. version,
159165 " Implementation-Vendor-Id" : project. group,
0 commit comments