Skip to content

Commit 271310d

Browse files
Adapt build to our defaults
Issues: IN-606
1 parent c00109a commit 271310d

2 files changed

Lines changed: 19 additions & 13 deletions

File tree

build.gradle

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

9499
repositories {
@@ -165,6 +170,7 @@ test {
165170
jar {
166171
manifest {
167172
attributes(
173+
"Implementation-Build-Date": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
168174
"Implementation-Title": project.description,
169175
"Implementation-Version": project.version,
170176
"Implementation-Vendor-Id": project.group,
@@ -190,10 +196,10 @@ tasks.register('fatJar', Jar) {
190196
tasks.withType(Test).configureEach {
191197
testLogging {
192198
events TestLogEvent.FAILED,
193-
TestLogEvent.SKIPPED
199+
TestLogEvent.SKIPPED
194200
exceptionFormat TestExceptionFormat.FULL
195201
showExceptions true
196202
showCauses true
197203
showStackTraces true
198204
}
199-
}
205+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)