Skip to content

Commit fbbd70c

Browse files
committed
fix: resolve snyk vulnerabilities
build: update plugins and dependencies build: clean up gradle configuration files
1 parent b4bcf5c commit fbbd70c

File tree

25 files changed

+413
-588
lines changed

25 files changed

+413
-588
lines changed

build.gradle

Lines changed: 84 additions & 112 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
id "com.netflix.nebula.maven-resolved-dependencies" version "21.2.0" apply false
@@ -11,63 +11,29 @@ version "7.0.0" // x-release-please-version
1111

1212
def platformProject = "platform"
1313

14-
allprojects {
15-
if (it.name != platformProject) {
16-
apply plugin: "java"
17-
}
18-
14+
subprojects {
1915
group "com.mx.path-facilities"
2016
description "MX Path Facilities"
2117
version rootProject.version
22-
sourceCompatibility = JavaVersion.VERSION_17
23-
targetCompatibility = JavaVersion.VERSION_17
24-
25-
repositories {
26-
mavenCentral()
27-
mavenLocal()
28-
}
29-
30-
configurations.all {
31-
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
32-
}
3318

3419
ext {
35-
pathSDKVersion = "[5.0,6.0)"
20+
pathCoreVersion = "[6.0,7.0)"
3621
}
37-
}
3822

39-
subprojects {
4023
if (it.name != platformProject) {
41-
apply plugin: "java-library"
42-
apply plugin: "groovy"
43-
apply plugin: "maven-publish"
44-
apply plugin: "signing"
4524
apply plugin: "com.github.mxenabled.coppuccino"
4625
apply plugin: "com.github.mxenabled.vogue"
26+
apply plugin: "groovy"
27+
apply plugin: "java-library"
4728
apply plugin: "io.freefair.lombok"
4829
apply plugin: "com.netflix.nebula.maven-resolved-dependencies"
4930

50-
dependencies {
51-
constraints {
52-
api "org.slf4j:slf4j-api:1.7.30"
53-
}
54-
55-
implementation platform("com.mx.path-core:platform:${project.ext.pathSDKVersion}")
56-
implementation "com.mx.path-core:common"
57-
testImplementation "com.mx.path-core:testing"
58-
testImplementation "org.spockframework:spock-core:2.4-M6-groovy-3.0"
59-
}
60-
61-
test { useJUnitPlatform() }
62-
63-
compileJava { options.compilerArgs << "-parameters" }
64-
65-
javadoc {
66-
classpath = configurations.compileClasspath
67-
options {
68-
setMemberLevel JavadocMemberLevel.PUBLIC
69-
setAuthor true
31+
java {
32+
toolchain {
33+
languageVersion = JavaLanguageVersion.of(17)
7034
}
35+
withSourcesJar()
36+
withJavadocJar()
7137
}
7238

7339
coppuccino {
@@ -81,74 +47,89 @@ subprojects {
8147
dependencyUpdatesOutputDir = "${projectDir}/build/dependencyUpdates"
8248
}
8349

84-
task sourcesJar(type: Jar, dependsOn: classes) {
85-
classifier = "sources"
86-
from sourceSets.main.allSource
50+
repositories {
51+
mavenCentral()
52+
mavenLocal()
8753
}
8854

89-
task packageJavadoc(type: Jar) {
90-
classifier = "javadoc"
91-
from javadoc
55+
dependencies {
56+
implementation platform("com.mx.path-core:platform:${project.ext.pathCoreVersion}")
57+
implementation "com.mx.path-core:common"
58+
59+
testImplementation "com.mx.path-core:testing"
9260
}
9361

94-
artifacts {
95-
archives sourcesJar
96-
archives jar
97-
archives packageJavadoc
62+
test { useJUnitPlatform() }
63+
64+
compileJava { options.compilerArgs << "-parameters" }
65+
66+
javadoc {
67+
classpath = configurations.compileClasspath
68+
options {
69+
setMemberLevel JavadocMemberLevel.PUBLIC
70+
setAuthor true
71+
}
9872
}
73+
}
74+
75+
apply plugin: "maven-publish"
76+
apply plugin: "signing"
9977

78+
if (it.name != platformProject) {
10079
publishing {
10180
publications {
10281
maven(MavenPublication) {
10382
from components.java
104-
artifact sourcesJar
105-
artifact packageJavadoc
106-
107-
pom {
108-
groupId = project.group
109-
artifactId = project.name
110-
name = project.name
111-
description = project.description
112-
url = "https://github.com/mxenabled/path-facilities"
113-
114-
developers {
115-
developer {
116-
name = "MX"
117-
email = "path@mx.com"
118-
organization = "MX Technologies Inc."
119-
url = "http://www.mx.com"
120-
}
121-
}
122-
123-
licenses {
124-
license {
125-
name = "Proprietary"
126-
url = "https://github.com/mxenabled/path-facilities/blob/master/LICENSE"
127-
distribution = "repo"
128-
}
129-
}
130-
131-
scm {
132-
connection = "scm:git:git@github.com:mxenabled/path-facilities.git"
133-
url = "https://github.com/mxenabled/path-facilities/tree/master"
134-
}
135-
}
13683
}
13784
}
13885
}
86+
}
87+
88+
publishing {
89+
publications.withType(MavenPublication).configureEach {
90+
pom {
91+
groupId = project.group
92+
artifactId = project.name
93+
name = project.name
94+
description = project.description
95+
url = "https://github.com/mxenabled/path-facilities"
96+
97+
developers {
98+
developer {
99+
name = "MX"
100+
email = "path@mx.com"
101+
organization = "MX Technologies Inc."
102+
url = "http://www.mx.com"
103+
}
104+
}
105+
106+
licenses {
107+
license {
108+
name = "Proprietary"
109+
url = "https://github.com/mxenabled/path-facilities/blob/master/LICENSE"
110+
distribution = "repo"
111+
}
112+
}
139113

140-
signing {
141-
def signingKey = findProperty("signingKey")
142-
def signingPassword = findProperty("signingKeyPassword")
143-
if (signingKey != null && signingKey != "") {
144-
useInMemoryPgpKeys(signingKey, signingPassword)
145-
sign publishing.publications.maven
146-
logger.lifecycle("Configuring signing for ${project.name}")
147-
} else {
148-
logger.lifecycle("Skipping artifact signing for ${project.name} - missing signing key")
114+
scm {
115+
connection = "scm:git:git@github.com:mxenabled/path-facilities.git"
116+
url = "https://github.com/mxenabled/path-facilities/tree/master"
117+
}
149118
}
150119
}
151120
}
121+
122+
signing {
123+
def signingKey = findProperty("signingKey")
124+
def signingPassword = findProperty("signingKeyPassword")
125+
if (signingKey != null && signingKey != "") {
126+
useInMemoryPgpKeys(signingKey, signingPassword)
127+
sign publishing.publications
128+
logger.lifecycle("Configuring signing for ${project.name}")
129+
} else {
130+
logger.lifecycle("Skipping artifact signing for ${project.name} - missing signing key")
131+
}
132+
}
152133
}
153134

154135
nexusPublishing {
@@ -166,25 +147,16 @@ nexusPublishing {
166147
}
167148

168149
task spotlessApply {
169-
subprojects.each {
170-
if (it.name != platformProject) {
171-
it.afterEvaluate {
172-
def spotlessApplyTask = it.tasks.findByName("spotlessApply")
173-
dependsOn(spotlessApplyTask)
174-
}
175-
}
176-
}
150+
dependsOn subprojects.findAll { it.name != platformProject }.collect { "${it.path}:spotlessApply" }
177151
}
178152

179153
task subdependencies {
180-
subprojects.each {
181-
if (it.name != platformProject) {
182-
it.afterEvaluate {
183-
def dependenciesTask = it.tasks.findByName("dependencies")
184-
dependsOn(dependenciesTask)
185-
}
186-
}
187-
}
154+
dependsOn subprojects.findAll { it.name != platformProject }.collect { "${it.path}:dependencies" }
188155
}
189156

190157
project.tasks.getByPath("dependencies").finalizedBy("subdependencies")
158+
159+
wrapper {
160+
gradleVersion = "7.6.4"
161+
distributionType = Wrapper.DistributionType.ALL
162+
}

encryption-service-jasypt/build.gradle

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,12 @@ coppuccino {
22
coverage {
33
minimumCoverage = 1.00
44
}
5-
dependencies {
6-
excludePreReleaseVersions = true
7-
}
85
}
96

107
dependencies {
118
implementation "org.jasypt:jasypt:1.9.3"
12-
implementation "commons-codec:commons-codec:1.15"
9+
implementation "commons-codec:commons-codec"
1310
compileOnly "org.slf4j:slf4j-api"
1411

15-
//testing dependencies
16-
testImplementation "org.mockito:mockito-inline:[5.0,6.0)"
17-
testImplementation "org.slf4j:slf4j-simple:1.7.30"
18-
testImplementation "org.spockframework:spock-core:2.4-M6-groovy-3.0"
12+
testImplementation "org.slf4j:slf4j-simple"
1913
}

encryption-service-jasypt/dependency_suppression.xml

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

0 commit comments

Comments
 (0)