Skip to content

Commit c4fcfbe

Browse files
author
may
committed
Switch Maven plugin and update deps
1 parent 28906ea commit c4fcfbe

File tree

6 files changed

+73
-111
lines changed

6 files changed

+73
-111
lines changed

build.gradle

Lines changed: 53 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
import com.vanniktech.maven.publish.JavaLibrary
2+
import com.vanniktech.maven.publish.JavadocJar
3+
import com.vanniktech.maven.publish.SonatypeHost
4+
15
plugins {
2-
id 'io.codearte.nexus-staging' version '0.30.0' // logs into Sonotype OSS and does a "Close" and "Release"
3-
id 'com.github.spotbugs' version '6.0.15'
6+
id 'com.github.spotbugs' version '6.1.11'
47
id 'com.adarshr.test-logger' version '4.0.0'
5-
id 'com.github.ben-manes.versions' version '0.51.0'
6-
id 'org.sonatype.gradle.plugins.scan' version '2.8.2'
7-
id 'org.sonarqube' version '5.0.0.4638'
8+
id 'com.github.ben-manes.versions' version '0.52.0'
9+
id 'org.sonatype.gradle.plugins.scan' version '3.1.1'
10+
id 'org.sonarqube' version '6.1.0.5360'
11+
id 'com.vanniktech.maven.publish' version '0.31.0'
812
}
913

1014
sonarqube {
@@ -18,39 +22,31 @@ sonarqube {
1822
}
1923
}
2024

21-
// configure nexus staging plugin
22-
nexusStaging {
23-
numberOfRetries = 50
24-
delayBetweenRetriesInMillis = 5000
25-
packageGroup = 'com.imsweb'
26-
}
27-
28-
// don't try to release a snapshot to a non-snapshot repository, that won't work anyway
29-
if (version.endsWith('-SNAPSHOT')) {
30-
gradle.startParameter.excludedTaskNames += 'closeAndReleaseRepository'
31-
}
32-
3325
subprojects {
3426
apply plugin: 'java-library'
35-
apply plugin: "com.github.spotbugs"
27+
apply plugin: 'com.github.spotbugs'
3628
apply plugin: 'jacoco'
3729
apply plugin: 'maven-publish'
3830
apply plugin: 'signing'
3931
apply plugin: 'com.adarshr.test-logger'
40-
apply plugin: "com.github.ben-manes.versions"
32+
apply plugin: 'com.github.ben-manes.versions'
4133
apply plugin: 'org.sonatype.gradle.plugins.scan'
42-
apply plugin: "org.sonarqube"
34+
apply plugin: 'org.sonarqube'
35+
apply plugin: 'com.vanniktech.maven.publish'
4336

4437
group = 'com.imsweb'
45-
version = '11.3.2'
38+
version = '11.4.0-SNAPSHOT'
4639

4740
dependencies {
48-
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
49-
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.2'
50-
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
51-
testImplementation 'org.assertj:assertj-core:3.26.0'
41+
testImplementation platform('org.junit:junit-bom:5.12.2')
42+
testImplementation 'org.junit.jupiter:junit-jupiter-api'
43+
testImplementation 'org.junit.jupiter:junit-jupiter-params'
44+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
45+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.12.2'
46+
47+
testImplementation 'org.assertj:assertj-core:3.27.3'
5248
testImplementation 'com.google.code.bean-matchers:bean-matchers:0.14'
53-
testImplementation 'org.slf4j:slf4j-simple:2.0.13'
49+
testImplementation 'org.slf4j:slf4j-simple:2.0.17'
5450
}
5551

5652
// fail the build if there are compiler warnings
@@ -62,9 +58,6 @@ subprojects {
6258
java {
6359
sourceCompatibility = JavaVersion.VERSION_1_8
6460
targetCompatibility = JavaVersion.VERSION_1_8
65-
66-
withJavadocJar()
67-
withSourcesJar()
6861
}
6962

7063
repositories {
@@ -134,79 +127,44 @@ subprojects {
134127
classpath = sourceSets.test.runtimeClasspath
135128
}
136129

137-
// don't try to sign a snapshot; its not needed
138-
if (version.endsWith('-SNAPSHOT')) {
139-
gradle.startParameter.excludedTaskNames += 'signMavenJavaPublication'
140-
}
130+
mavenPublishing {
131+
configure(new JavaLibrary(new JavadocJar.Javadoc(), true))
141132

142-
publishing {
143-
publications {
144-
mavenJava(MavenPublication) {
145-
artifactId = project.name
146-
from components.java
147-
versionMapping {
148-
usage('java-api') {
149-
fromResolutionOf('runtimeClasspath')
150-
}
151-
usage('java-runtime') {
152-
fromResolutionResult()
153-
}
154-
}
155-
pom {
156-
name = 'Staging Java Client'
157-
description = 'A cancer staging client library'
158-
url = 'https://github.com/imsweb/staging-client-java'
159-
inceptionYear = '2015'
160-
161-
licenses {
162-
license {
163-
name = 'A modified BSD License (BSD)'
164-
url = 'https://github.com/imsweb/staging-client-java/blob/master/LICENSE'
165-
distribution = 'repo'
166-
}
167-
}
168-
169-
developers {
170-
developer {
171-
id = 'ctmay4'
172-
name = 'Chuck May'
173-
174-
}
175-
}
176-
177-
scm {
178-
url = 'https://github.com/imsweb/staging-client-java'
179-
connection = 'scm:https://github.com/imsweb/staging-client-java.git'
180-
developerConnection = 'scm:[email protected]:imsweb/staging-client-java.git'
181-
}
133+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, true)
134+
signAllPublications()
135+
136+
pom {
137+
name = 'Staging Java Client'
138+
description = 'A cancer staging client library'
139+
url = 'https://github.com/imsweb/staging-client-java'
140+
inceptionYear = '2015'
141+
142+
licenses {
143+
license {
144+
name = 'A modified BSD License (BSD)'
145+
url = 'https://github.com/imsweb/staging-client-java/blob/master/LICENSE'
146+
distribution = 'repo'
182147
}
183148
}
184-
}
185-
repositories {
186-
maven {
187-
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
188-
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
189-
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
190-
191-
credentials {
192-
username = project.findProperty('nexusUsername') ?: ''
193-
password = project.findProperty('nexusPassword') ?: ''
149+
150+
developers {
151+
developer {
152+
id = 'ctmay4'
153+
name = 'Chuck May'
154+
194155
}
195156
}
157+
158+
scm {
159+
url = 'https://github.com/imsweb/staging-client-java'
160+
connection = 'scm:https://github.com/imsweb/staging-client-java.git'
161+
developerConnection = 'scm:[email protected]:imsweb/staging-client-java.git'
162+
}
196163
}
197164
}
198165

199-
signing {
200-
def signingKey = project.findProperty('signingKey') ?: ''
201-
def signingPassword = project.findProperty('signingPassword') ?: ''
202-
203-
useInMemoryPgpKeys(signingKey, signingPassword)
204-
205-
sign publishing.publications.mavenJava
166+
wrapper {
167+
gradleVersion = '8.14'
168+
distributionType = Wrapper.DistributionType.ALL
206169
}
207-
}
208-
209-
wrapper {
210-
gradleVersion = '8.8'
211-
distributionType = Wrapper.DistributionType.ALL
212170
}

gradle/wrapper/gradle-wrapper.jar

311 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ plugins {
33
}
44

55
dependencies {
6-
api "com.fasterxml.jackson.core:jackson-core:2.17.2"
7-
api "com.fasterxml.jackson.core:jackson-annotations:2.17.2"
8-
api "com.fasterxml.jackson.core:jackson-databind:2.17.2"
6+
api "com.fasterxml.jackson.core:jackson-core:2.19.0"
7+
api "com.fasterxml.jackson.core:jackson-annotations:2.19.0"
8+
api "com.fasterxml.jackson.core:jackson-databind:2.19.0"
99

1010
implementation "org.cache2k:cache2k-api:2.6.1.Final"
1111
runtimeOnly "org.cache2k:cache2k-core:2.6.1.Final"
1212

13-
implementation 'org.apache.commons:commons-lang3:3.15.0'
13+
implementation 'org.apache.commons:commons-lang3:3.17.0'
1414
implementation 'org.ahocorasick:ahocorasick:0.6.3'
1515

16-
implementation 'org.slf4j:slf4j-api:2.0.13'
16+
implementation 'org.slf4j:slf4j-api:2.0.17'
1717

18-
testFixturesImplementation 'com.imsweb:seerapi-client-java:5.6'
19-
testFixturesImplementation 'org.slf4j:slf4j-simple:2.0.13'
18+
testFixturesImplementation 'com.imsweb:seerapi-client-java:5.8'
19+
testFixturesImplementation 'org.slf4j:slf4j-simple:2.0.17'
2020
testFixturesImplementation 'org.zeroturnaround:zt-zip:1.17'
21-
testFixturesImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3'
22-
testFixturesImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.3'
21+
testFixturesImplementation 'org.junit.jupiter:junit-jupiter-api:5.12.2'
22+
testFixturesImplementation 'org.junit.jupiter:junit-jupiter-params:5.12.2'
2323
}
2424

0 commit comments

Comments
 (0)