Skip to content

Commit ee50d44

Browse files
committed
build: update plugins and dependencies
build: clean up gradle configuration files Release-As: 6.0.2
1 parent 1116f72 commit ee50d44

22 files changed

Lines changed: 232 additions & 325 deletions

File tree

.vogue.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

build.gradle

Lines changed: 97 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
2+
id "com.github.mxenabled.coppuccino" version "6.+" apply false
3+
id "com.github.mxenabled.vogue" version "3.+" apply false
24
id "idea"
3-
id "com.github.mxenabled.coppuccino" version "5.+" apply false
4-
id "com.github.mxenabled.vogue" version "2.+"
55
id "io.freefair.lombok" version "8.+" apply false
66
id "io.github.gradle-nexus.publish-plugin" version "1.1.+"
77
}
@@ -21,100 +21,80 @@ def publishedProjects = [
2121
"utilities"
2222
]
2323

24-
allprojects {
25-
if (it.name != platformProject) {
26-
apply plugin: "java"
27-
}
28-
24+
subprojects {
2925
group "com.mx.path-core"
3026
description "MX Path Core"
3127
version rootProject.version
32-
sourceCompatibility = JavaVersion.VERSION_17
33-
targetCompatibility = JavaVersion.VERSION_17
3428

35-
repositories {
36-
mavenCentral()
37-
mavenLocal()
38-
}
39-
40-
configurations.configureEach {
41-
resolutionStrategy.eachDependency { details ->
42-
//Uncontrolled Recursion [High Severity][https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHECOMMONS-10734078] in org.apache.commons:commons-lang3@3.17.0
43-
// introduced by net.sourceforge.pmd:pmd-java@7.16.0 > org.apache.commons:commons-lang3@3.17.0 and 7 other path(s)
44-
// This issue was fixed in versions: 3.18.0
45-
if (details.requested.group == "org.apache.commons" && details.requested.name == "commons-lang3") {
46-
details.useVersion "3.18.0"
47-
}
48-
//Improper Validation of Certificate with Host Mismatch [Medium Severity][https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHELOGGINGLOG4J-14532782] in org.apache.logging.log4j:log4j-core@2.25.2
49-
// introduced by com.github.spotbugs:spotbugs@4.9.8 > org.apache.logging.log4j:log4j-core@2.25.2
50-
// This issue was fixed in versions: 2.25.3
51-
else if (details.requested.group == "org.apache.logging.log4j" && details.requested.name == "log4j-core") {
52-
details.useVersion "2.25.3"
53-
}
54-
}
55-
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
56-
}
57-
}
58-
59-
subprojects {
6029
if (it.name != platformProject) {
61-
apply plugin: "java-library"
62-
apply plugin: "groovy"
6330
apply plugin: "com.github.mxenabled.coppuccino"
6431
apply plugin: "com.github.mxenabled.vogue"
32+
apply plugin: "groovy"
33+
apply plugin: "java-library"
6534
apply plugin: "io.freefair.lombok"
6635

36+
java {
37+
toolchain {
38+
languageVersion = JavaLanguageVersion.of(17)
39+
}
40+
withSourcesJar()
41+
withJavadocJar()
42+
}
43+
44+
coppuccino {
45+
rootDir = "${projectDir}/"
46+
}
47+
48+
vogue {
49+
dependencyUpdatesOutputDir = "${projectDir}/build/dependencyUpdates"
50+
}
51+
52+
repositories {
53+
mavenCentral()
54+
mavenLocal()
55+
}
56+
6757
ext {
6858
mockitoVersion = "[5.0,6.0)"
6959
spockVersion = "2.4-M6-groovy-3.0"
7060
junitVersion = "5.14.0"
61+
openTracingVersion = "[0.33,0.34)"
62+
slf4jVersion = "1.7.30"
7163
}
7264

7365
dependencies {
7466
constraints {
75-
api("com.google.code.gson:gson") {
76-
version {
77-
require "[2.13.0,13.0.0)"
78-
}
79-
}
80-
api("io.opentracing:opentracing-api") {
81-
version {
82-
require "[0.33,0.34)"
83-
}
84-
}
85-
api("io.opentracing:opentracing-noop") {
86-
version {
87-
require "[0.33,0.34)"
88-
}
89-
}
90-
api("io.opentracing:opentracing-util") {
91-
version {
92-
require "[0.33,0.34)"
93-
}
94-
}
95-
api("com.google.guava:guava") {
96-
version {
97-
require "[32.0,33.0)"
98-
}
99-
}
100-
api("com.github.rholder:guava-retrying") {
101-
version {
102-
require "[2.0,3.0)"
103-
}
104-
}
67+
// --- Shared Libraries ---
68+
api "com.google.code.gson:gson:[2.13.0,3.0.0)"
69+
api "io.opentracing:opentracing-api:${project.ext.openTracingVersion}"
70+
api "io.opentracing:opentracing-noop:${project.ext.openTracingVersion}"
71+
api "io.opentracing:opentracing-util:${project.ext.openTracingVersion}"
72+
api "com.google.guava:guava:[32.0,33.0)"
73+
api "com.github.rholder:guava-retrying:[2.0,3.0)"
74+
10575
api "com.datadoghq:dd-trace-api:1.38.0"
106-
api "org.slf4j:slf4j-api:1.7.30"
107-
api "org.apache.httpcomponents:httpclient:4.5.13"
76+
api "org.apache.httpcomponents:httpclient:4.5.14"
77+
api "org.slf4j:slf4j-api:${project.ext.slf4jVersion}"
10878

10979
// -----------------------------------------------------------------
11080
// These re-add JAXB classes needed for SOAP interaction.
11181
// Version changes to any of these need to be tested (not just built)
112-
// with an apps that use SOAP.
82+
// with an app that uses SOAP.
11383
// -----------------------------------------------------------------
11484
api "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4!!"
11585
api "jakarta.xml.soap:jakarta.xml.soap-api:3.0.2!!"
11686
api "com.sun.xml.bind:jaxb-impl:4.0.6!!"
11787
api "org.glassfish.jaxb:jaxb-runtime:4.0.6!!"
88+
89+
// --- Shared Testing Libraries ---
90+
api "io.opentracing:opentracing-mock:${project.ext.openTracingVersion}"
91+
api "org.slf4j:slf4j-simple:${project.ext.slf4jVersion}"
92+
93+
// --- Security Overrides ---
94+
// Pulled in by org.apache.httpcomponents:httpclient:4.5.14
95+
api("commons-codec:commons-codec:1.14") {
96+
because "Fixes Low Severity vulnerability SNYK-JAVA-COMMONSCODEC-561518"
97+
}
11898
}
11999

120100
testImplementation "org.mockito:mockito-inline:${project.ext.mockitoVersion}"
@@ -133,85 +113,65 @@ subprojects {
133113
setAuthor true
134114
}
135115
}
116+
}
136117

137-
coppuccino {
138-
rootDir = "${projectDir}/"
139-
}
140-
141-
vogue {
142-
dependencyUpdatesOutputDir = "${projectDir}/build/dependencyUpdates"
143-
}
144-
145-
task sourcesJar(type: Jar, dependsOn: classes) {
146-
classifier = "sources"
147-
from sourceSets.main.allSource
148-
}
149-
150-
task packageJavadoc(type: Jar) {
151-
classifier = "javadoc"
152-
from javadoc
153-
}
154-
155-
artifacts {
156-
archives sourcesJar
157-
archives jar
158-
archives packageJavadoc
159-
}
160-
161-
if (publishedProjects.contains(it.name)) {
162-
apply plugin: "maven-publish"
163-
apply plugin: "signing"
118+
if (publishedProjects.contains(it.name)) {
119+
apply plugin: "maven-publish"
120+
apply plugin: "signing"
164121

122+
if (it.name != platformProject) {
165123
publishing {
166124
publications {
167125
maven(MavenPublication) {
168126
from components.java
169-
artifact sourcesJar
170-
artifact packageJavadoc
171-
172-
pom {
173-
groupId = project.group
174-
artifactId = project.name
175-
name = project.name
176-
description = project.description
177-
url = "https://github.com/mxenabled/path-core"
178-
179-
developers {
180-
developer {
181-
name = "MX"
182-
email = "path@mx.com"
183-
organization = "MX Technologies Inc."
184-
url = "http://www.mx.com"
185-
}
186-
}
127+
}
128+
}
129+
}
130+
}
187131

188-
licenses {
189-
license {
190-
name = "Proprietary"
191-
url = "https://github.com/mxenabled/path-core/blob/master/LICENSE"
192-
distribution = "repo"
193-
}
194-
}
132+
publishing {
133+
publications.withType(MavenPublication).configureEach {
134+
pom {
135+
groupId = project.group
136+
artifactId = project.name
137+
name = project.name
138+
description = project.description
139+
url = "https://github.com/mxenabled/path-core"
140+
141+
developers {
142+
developer {
143+
name = "MX"
144+
email = "path@mx.com"
145+
organization = "MX Technologies Inc."
146+
url = "http://www.mx.com"
147+
}
148+
}
195149

196-
scm {
197-
connection = "scm:git:git@github.com:mxenabled/path-core.git"
198-
url = "https://github.com/mxenabled/path-core/tree/master"
199-
}
150+
licenses {
151+
license {
152+
name = "Proprietary"
153+
url = "https://github.com/mxenabled/path-core/blob/master/LICENSE"
154+
distribution = "repo"
200155
}
201156
}
157+
158+
scm {
159+
connection = "scm:git:git@github.com:mxenabled/path-core.git"
160+
url = "https://github.com/mxenabled/path-core/tree/master"
161+
}
202162
}
203163
}
164+
}
204165

205-
signing {
206-
def signingKey = findProperty("signingKey")
207-
def signingPassword = findProperty("signingKeyPassword")
208-
if (signingKey != null && signingKey != "") {
209-
useInMemoryPgpKeys(signingKey, signingPassword)
210-
sign publishing.publications.maven
211-
logger.lifecycle("Configuring signing for ${project.name}")
212-
} else {
213-
logger.lifecycle("Skipping artifact signing for ${project.name} - missing signing key")
214-
}
166+
signing {
167+
def signingKey = findProperty("signingKey")
168+
def signingPassword = findProperty("signingKeyPassword")
169+
if (signingKey != null && signingKey != "") {
170+
useInMemoryPgpKeys(signingKey, signingPassword)
171+
sign publishing.publications
172+
logger.lifecycle("Configuring signing for ${project.name}")
173+
} else {
174+
logger.lifecycle("Skipping artifact signing for ${project.name} - missing signing key")
215175
}
216176
}
217177
}
@@ -232,25 +192,11 @@ nexusPublishing {
232192
}
233193

234194
task spotlessApply {
235-
subprojects.each {
236-
if (it.name != platformProject) {
237-
it.afterEvaluate {
238-
def spotlessApplyTask = it.tasks.findByName("spotlessApply")
239-
dependsOn(spotlessApplyTask)
240-
}
241-
}
242-
}
195+
dependsOn subprojects.findAll { it.name != platformProject }.collect { "${it.path}:spotlessApply" }
243196
}
244197

245198
task subdependencies {
246-
subprojects.each {
247-
if (it.name != platformProject) {
248-
it.afterEvaluate {
249-
def dependenciesTask = it.tasks.findByName("dependencies")
250-
dependsOn(dependenciesTask)
251-
}
252-
}
253-
}
199+
dependsOn subprojects.findAll { it.name != platformProject }.collect { "${it.path}:dependencies" }
254200
}
255201

256202
project.tasks.getByPath("dependencies").finalizedBy("subdependencies")

common/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ coppuccino {
55
}
66

77
dependencies {
8-
api "org.apache.commons:commons-text:latest.release" // For string manipulation utilities. There is a very small overlap with Guava's strings class, but adds many more features.
8+
api "org.apache.commons:commons-text:1.15.0" // For string manipulation utilities
99
api "com.google.guava:guava"
1010
api "com.github.rholder:guava-retrying" // For Request retries
11-
api "com.github.spotbugs:spotbugs-annotations:4.9.8" // For annotating classes and methods to suppress SpotBugs violations
1211
api "com.google.code.gson:gson"
1312
api "org.yaml:snakeyaml:2.4"
14-
implementation "org.slf4j:slf4j-api"
13+
1514
implementation "org.objenesis:objenesis:3.3"
16-
testImplementation "org.objenesis:objenesis:3.3"
15+
implementation "org.slf4j:slf4j-api"
1716
}

common/gradle.lockfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# This file is expected to be part of source control.
44
com.github.oowekyala.ooxml:nice-xml-messages:3.1=pmd
55
com.github.rholder:guava-retrying:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
6-
com.github.spotbugs:spotbugs-annotations:4.9.8=compileClasspath,runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath
6+
com.github.spotbugs:spotbugs-annotations:4.9.8=annotationProcessor,compileClasspath,spotbugs,testAnnotationProcessor,testCompileClasspath
77
com.github.spotbugs:spotbugs:4.9.8=spotbugs
88
com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs
9-
com.google.code.findbugs:jsr305:3.0.2=checkstyle,compileClasspath,runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath
9+
com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,compileClasspath,runtimeClasspath,spotbugs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
1010
com.google.code.gson:gson:2.13.1=pmd
1111
com.google.code.gson:gson:2.13.2=compileClasspath,runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath
1212
com.google.errorprone:error_prone_annotations:2.36.0=checkstyle
@@ -37,7 +37,9 @@ net.sourceforge.pmd:pmd-java:7.16.0=pmd
3737
org.antlr:antlr4-runtime:4.13.2=checkstyle
3838
org.antlr:antlr4-runtime:4.9.3=pmd
3939
org.apache.bcel:bcel:6.11.0=spotbugs
40-
org.apache.commons:commons-lang3:3.18.0=checkstyle,compileClasspath,pmd,runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath
40+
org.apache.commons:commons-lang3:3.18.0=checkstyle,pmd
41+
org.apache.commons:commons-lang3:3.19.0=spotbugs
42+
org.apache.commons:commons-lang3:3.20.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
4143
org.apache.commons:commons-text:1.14.0=spotbugs
4244
org.apache.commons:commons-text:1.15.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
4345
org.apache.commons:commons-text:1.3=checkstyle
@@ -73,7 +75,7 @@ org.jspecify:jspecify:1.0.0=checkstyle
7375
org.junit.jupiter:junit-jupiter-api:5.14.0=testCompileClasspath,testRuntimeClasspath
7476
org.junit.platform:junit-platform-commons:1.14.0=testCompileClasspath,testRuntimeClasspath
7577
org.junit.platform:junit-platform-engine:1.14.0=testCompileClasspath,testRuntimeClasspath
76-
org.junit:junit-bom:5.14.0=runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath
78+
org.junit:junit-bom:5.14.0=annotationProcessor,spotbugs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
7779
org.mockito:mockito-core:5.2.0=testCompileClasspath,testRuntimeClasspath
7880
org.mockito:mockito-inline:5.2.0=testCompileClasspath,testRuntimeClasspath
7981
org.objenesis:objenesis:3.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath

0 commit comments

Comments
 (0)