Skip to content

Commit 3ec42dc

Browse files
committed
Updated dependencies
1 parent f6576b8 commit 3ec42dc

File tree

8 files changed

+75
-116
lines changed

8 files changed

+75
-116
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/setup-java@v3
2020
with:
2121
distribution: 'adopt'
22-
java-version: '17'
22+
java-version: '21'
2323
cache: 'gradle'
2424

2525
- name: Cache SonarCloud packages

.github/workflows/publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
uses: actions/setup-java@v3
2121
with:
2222
distribution: 'adopt'
23-
java-version: '17'
23+
java-version: '21'
2424
cache: 'gradle'
2525

2626
- name: Publish
2727
run: |
2828
chmod +x gradlew
29-
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
29+
./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
3030
env:
31-
ORG_GRADLE_PROJECT_nexusUsername: ${{ secrets.NEXUS_USERNAME }}
32-
ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.NEXUS_PASSWORD }}
33-
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SEER_GPG_SECRET_KEY }}
34-
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SEER_GPG_PASSWORD }}
31+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
32+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
33+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
34+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## NAACCR API Client Version History
22

3+
**Changes in version 1.2**
4+
5+
- Updated dependencies.
6+
37
**Changes in version 1.1**
48

59
- Updated dependencies.

build.gradle

Lines changed: 46 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
import java.time.Duration
1+
import com.vanniktech.maven.publish.*
22

33
plugins {
44
id 'java-library'
55
id 'checkstyle'
66
id 'jacoco'
7-
id 'com.github.spotbugs' version '6.0.26'
8-
id 'maven-publish'
9-
id 'signing'
10-
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' // publish to Maven Central
11-
id 'com.github.ben-manes.versions' version '0.51.0' // check for out-of-date dependencies (run 'dependencyUpdates' manually)
12-
id 'org.sonatype.gradle.plugins.scan' version '2.8.3' // scan for vulnerabilities
13-
id 'org.sonarqube' version '5.1.0.4882' // sonarQube analysis
7+
id 'com.vanniktech.maven.publish' version '0.32.0' // publish to Maven Central
8+
id 'com.github.ben-manes.versions' version '0.52.0' // check for out-of-date dependencies (run 'dependencyUpdates' manually)
9+
id 'com.github.spotbugs' version '6.1.11' // spotbugs code analysis
10+
id 'org.sonatype.gradle.plugins.scan' version '3.1.1' // scan for vulnerabilities
11+
id 'org.sonarqube' version '6.1.0.5360' // sonarQube analysis
1412
}
1513

1614
group = 'com.imsweb'
@@ -33,36 +31,32 @@ dependencies {
3331

3432
// retrofit will not update these dependencies to fix vulnerabilities
3533
api 'com.squareup.okhttp3:okhttp:4.12.0'
36-
api 'com.squareup.okio:okio:3.9.1'
34+
api 'com.squareup.okio:okio:3.11.0'
3735

3836
// newer version of dependency to fix vulnerability until converter-jackson is updated
39-
api 'com.fasterxml.jackson.core:jackson-databind:2.18.1'
37+
api 'com.fasterxml.jackson.core:jackson-databind:2.19.0'
4038

4139
testImplementation 'junit:junit:4.13.2'
4240
testImplementation 'com.imsweb:seerutils:5.6'
4341
}
4442

45-
// enforce UTF-8, display the compilation warnings
43+
java {
44+
sourceCompatibility = JavaVersion.VERSION_11
45+
targetCompatibility = JavaVersion.VERSION_11
46+
}
47+
4648
tasks.withType(JavaCompile).configureEach {
4749
options.encoding = 'UTF-8'
48-
options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation' << '-Xlint:rawtypes' << '-Werror'
50+
options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation'
4951
}
5052

51-
// the Javadoc was made way too strict in Java 8 and it's not worth the time fixing everything!
5253
tasks.withType(Javadoc).configureEach {
5354
options.addStringOption('Xdoclint:none', '-quiet')
55+
options.addStringOption('encoding', 'UTF-8')
56+
options.addStringOption('charSet', 'UTF-8')
57+
options.addBooleanOption('html5', true)
5458
}
5559

56-
// generate javadoc and sources (required by Nexus)
57-
java {
58-
sourceCompatibility = JavaVersion.VERSION_11
59-
targetCompatibility = JavaVersion.VERSION_11
60-
61-
withJavadocJar()
62-
withSourcesJar()
63-
}
64-
65-
// customize the manifest
6660
jar {
6761
manifest {
6862
attributes('Implementation-Title': project.name,
@@ -84,22 +78,19 @@ ossIndexAudit {
8478
}
8579
check.dependsOn 'ossIndexAudit'
8680

87-
// checkstyle plugin settings
8881
checkstyle {
8982
ignoreFailures = true
9083
configFile = project(':').file('config/checkstyle/checkstyle.xml')
9184
configProperties = ['suppressionFile': project(':').file('config/checkstyle/suppressions.xml')]
9285
}
9386

94-
// jacoco plugin settings
9587
jacocoTestReport {
9688
reports {
9789
xml.required = true
9890
}
9991
}
10092
test.finalizedBy jacocoTestReport
10193

102-
// spotbugs plugin settings
10394
spotbugs {
10495
ignoreFailures = true
10596
excludeFilter.set(project(':').file("config/spotbugs/spotbugs-exclude.xml"))
@@ -128,87 +119,46 @@ tasks.named("dependencyUpdates").configure {
128119
}
129120
}
130121

131-
// needed to deploy to Maven Central
132-
publishing {
133-
publications {
134-
mavenJava(MavenPublication) {
135-
artifactId = 'naaccr-api-client'
136-
from components.java
137-
versionMapping {
138-
usage('java-api') {
139-
fromResolutionOf('runtimeClasspath')
140-
}
141-
usage('java-runtime') {
142-
fromResolutionResult()
143-
}
144-
}
145-
pom {
146-
name = 'NAACCR API Client'
147-
description = 'Wraps calls to the NAACCR API.'
148-
url = 'https://github.com/imsweb/naaccr-api-client'
149-
inceptionYear = '2023'
150-
151-
licenses {
152-
license {
153-
name = 'A modified BSD License (BSD)'
154-
url = 'https://github.com/imsweb/layout/blob/master/LICENSE'
155-
distribution = 'repo'
156-
}
157-
}
158-
159-
developers {
160-
developer {
161-
id = 'depryf'
162-
name = 'Fabian Depry'
163-
164-
}
165-
}
166-
167-
scm {
168-
url = 'https://github.com/imsweb/naaccr-api-client'
169-
connection = 'scm:https://github.com/imsweb/naaccr-api-client.git'
170-
developerConnection = 'scm:[email protected]:imsweb/naaccr-api-client.git'
171-
}
172-
}
173-
}
174-
}
175-
}
176-
177-
// setup JAR signing
178-
signing {
179-
required { !project.version.endsWith('-SNAPSHOT') }
180-
181-
String signingKey = project.findProperty('signingKey') ?: ''
182-
String signingPassword = project.findProperty('signingPassword') ?: ''
183-
184-
useInMemoryPgpKeys(signingKey, signingPassword)
122+
// needed to deploy to Maven Central Portal
123+
mavenPublishing {
124+
configure(new JavaLibrary(new JavadocJar.Javadoc(), true))
185125

186-
sign publishing.publications.mavenJava
187-
}
126+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, true)
127+
signAllPublications()
188128

189-
// needed to release on maven central
190-
nexusPublishing {
191-
repositories {
192-
sonatype {
193-
stagingProfileId = '63e5ddd3ab0d16'
129+
pom {
130+
name = 'NAACCR API Client'
131+
description = 'Wraps calls to the NAACCR API.'
132+
url = 'https://github.com/imsweb/naaccr-api-client'
133+
inceptionYear = '2023'
194134

195-
username = project.findProperty("nexusUsername")
196-
password = project.findProperty("nexusPassword")
135+
licenses {
136+
license {
137+
name = 'A modified BSD License (BSD)'
138+
url = 'https://github.com/imsweb/layout/blob/master/LICENSE'
139+
distribution = 'repo'
140+
}
197141
}
198-
}
199142

200-
clientTimeout = Duration.ofSeconds(300)
201-
connectTimeout = Duration.ofSeconds(60)
143+
developers {
144+
developer {
145+
id = 'depryf'
146+
name = 'Fabian Depry'
147+
148+
}
149+
}
202150

203-
transitionCheckOptions {
204-
maxRetries.set(50)
205-
delayBetween.set(Duration.ofMillis(5000))
151+
scm {
152+
url = 'https://github.com/imsweb/naaccr-api-client'
153+
connection = 'scm:https://github.com/imsweb/naaccr-api-client.git'
154+
developerConnection = 'scm:[email protected]:imsweb/naaccr-api-client.git'
155+
}
206156
}
207157
}
208158

209159
// Gradle wrapper, this allows to build the project without having to install Gradle!
210160
wrapper {
211-
gradleVersion = '8.11'
161+
gradleVersion = '8.14'
212162
distributionType = Wrapper.DistributionType.ALL
213163
}
214164

gradle/wrapper/gradle-wrapper.jar

-19.7 KB
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.11-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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
8891

8992
# Use the maximum available, or set MAX_FD != -1 to use that value.
9093
MAX_FD=maximum

gradlew.bat

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
4345
%JAVA_EXE% -version >NUL 2>&1
4446
if %ERRORLEVEL% equ 0 goto execute
4547

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
48+
echo. 1>&2
49+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50+
echo. 1>&2
51+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52+
echo location of your Java installation. 1>&2
5153

5254
goto fail
5355

@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5759

5860
if exist "%JAVA_EXE%" goto execute
5961

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
62+
echo. 1>&2
63+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64+
echo. 1>&2
65+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66+
echo location of your Java installation. 1>&2
6567

6668
goto fail
6769

0 commit comments

Comments
 (0)