Skip to content

Commit c2a6b83

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

18 files changed

Lines changed: 311 additions & 465 deletions

.clothesline.yaml

Whitespace-only changes.

.vogue.yml

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

build.gradle

Lines changed: 83 additions & 109 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
@@ -18,58 +18,30 @@ def publishedProjects = [
1818
"mdx-web"
1919
]
2020

21-
allprojects {
22-
if (it.name != platformProject) {
23-
apply plugin: "java"
24-
}
25-
21+
subprojects {
2622
group "com.mx.path-mdx-model"
2723
description "Path MDX Model"
2824
version rootProject.version
29-
sourceCompatibility = JavaVersion.VERSION_17
30-
targetCompatibility = JavaVersion.VERSION_17
31-
32-
repositories {
33-
mavenCentral()
34-
mavenLocal()
35-
}
36-
37-
configurations.all {
38-
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
39-
}
4025

4126
ext {
42-
pathSDKVersion = "[6.0,7.0)"
27+
pathCoreVersion = "[6.0,7.0)"
4328
springVersion = "3.5.8"
4429
}
45-
}
4630

47-
subprojects {
4831
if (it.name != platformProject) {
49-
apply plugin: "java-library"
50-
apply plugin: "groovy"
5132
apply plugin: "com.github.mxenabled.coppuccino"
5233
apply plugin: "com.github.mxenabled.vogue"
34+
apply plugin: "groovy"
35+
apply plugin: "java-library"
5336
apply plugin: "io.freefair.lombok"
5437
apply plugin: "com.netflix.nebula.maven-resolved-dependencies"
5538

56-
dependencies {
57-
api platform("com.mx.path-core:platform:${project.ext.pathSDKVersion}")
58-
59-
testImplementation "org.mockito:mockito-inline:[5.0,6.0)"
60-
testImplementation "org.spockframework:spock-core:2.4-M6-groovy-3.0"
61-
}
62-
63-
test { useJUnitPlatform() }
64-
65-
compileJava { options.compilerArgs << "-parameters" }
66-
67-
javadoc {
68-
classpath = configurations.compileClasspath
69-
options {
70-
setMemberLevel JavadocMemberLevel.PUBLIC
71-
setAuthor true
39+
java {
40+
toolchain {
41+
languageVersion = JavaLanguageVersion.of(17)
7242
}
43+
withSourcesJar()
44+
withJavadocJar()
7345
}
7446

7547
coppuccino {
@@ -83,78 +55,89 @@ subprojects {
8355
dependencyUpdatesOutputDir = "${projectDir}/build/dependencyUpdates"
8456
}
8557

86-
task sourcesJar(type: Jar, dependsOn: classes) {
87-
classifier = "sources"
88-
from sourceSets.main.allSource
58+
repositories {
59+
mavenCentral()
60+
mavenLocal()
8961
}
9062

91-
task packageJavadoc(type: Jar) {
92-
classifier = "javadoc"
93-
from javadoc
63+
dependencies {
64+
api platform("com.mx.path-core:platform:${project.ext.pathCoreVersion}")
65+
66+
testImplementation "com.mx.path-core:testing"
9467
}
9568

96-
artifacts {
97-
archives sourcesJar
98-
archives jar
99-
archives packageJavadoc
69+
test { useJUnitPlatform() }
70+
71+
compileJava { options.compilerArgs << "-parameters" }
72+
73+
javadoc {
74+
classpath = configurations.compileClasspath
75+
options {
76+
setMemberLevel JavadocMemberLevel.PUBLIC
77+
setAuthor true
78+
}
10079
}
80+
}
10181

102-
if (publishedProjects.contains(it.name)) {
103-
apply plugin: "maven-publish"
104-
apply plugin: "signing"
82+
if (publishedProjects.contains(it.name)) {
83+
apply plugin: "maven-publish"
84+
apply plugin: "signing"
10585

86+
if (it.name != platformProject) {
10687
publishing {
10788
publications {
10889
maven(MavenPublication) {
10990
from components.java
110-
artifact sourcesJar
111-
artifact packageJavadoc
112-
113-
pom {
114-
groupId = project.group
115-
artifactId = project.name
116-
name = project.name
117-
description = project.description
118-
url = "https://github.com/mxenabled/path-mdx-model"
119-
120-
developers {
121-
developer {
122-
name = "MX"
123-
email = "path@mx.com"
124-
organization = "MX Technologies Inc."
125-
url = "http://www.mx.com"
126-
}
127-
}
128-
129-
licenses {
130-
license {
131-
name = "Proprietary"
132-
url = "https://github.com/mxenabled/path-mdx-model/blob/master/LICENSE"
133-
distribution = "repo"
134-
}
135-
}
136-
137-
scm {
138-
connection = "scm:git:git@github.com:mxenabled/path-mdx-model.git"
139-
url = "https://github.com/mxenabled/path-mdx-model/tree/master"
140-
}
141-
}
14291
}
14392
}
14493
}
94+
}
95+
96+
publishing {
97+
publications.withType(MavenPublication).configureEach {
98+
pom {
99+
groupId = project.group
100+
artifactId = project.name
101+
name = project.name
102+
description = project.description
103+
url = "https://github.com/mxenabled/path-mdx-model"
104+
105+
developers {
106+
developer {
107+
name = "MX"
108+
email = "path@mx.com"
109+
organization = "MX Technologies Inc."
110+
url = "http://www.mx.com"
111+
}
112+
}
113+
114+
licenses {
115+
license {
116+
name = "Proprietary"
117+
url = "https://github.com/mxenabled/path-mdx-model/blob/master/LICENSE"
118+
distribution = "repo"
119+
}
120+
}
145121

146-
signing {
147-
def signingKey = findProperty("signingKey")
148-
def signingPassword = findProperty("signingKeyPassword")
149-
if (signingKey != null && signingKey != "") {
150-
useInMemoryPgpKeys(signingKey, signingPassword)
151-
sign publishing.publications.maven
152-
logger.lifecycle("Configuring signing for ${project.name}")
153-
} else {
154-
logger.lifecycle("Skipping artifact signing for ${project.name} - missing signing key")
122+
scm {
123+
connection = "scm:git:git@github.com:mxenabled/path-mdx-model.git"
124+
url = "https://github.com/mxenabled/path-mdx-model/tree/master"
125+
}
155126
}
156127
}
157128
}
129+
130+
signing {
131+
def signingKey = findProperty("signingKey")
132+
def signingPassword = findProperty("signingKeyPassword")
133+
if (signingKey != null && signingKey != "") {
134+
useInMemoryPgpKeys(signingKey, signingPassword)
135+
sign publishing.publications
136+
logger.lifecycle("Configuring signing for ${project.name}")
137+
} else {
138+
logger.lifecycle("Skipping artifact signing for ${project.name} - missing signing key")
139+
}
140+
}
158141
}
159142
}
160143

@@ -173,25 +156,16 @@ nexusPublishing {
173156
}
174157

175158
task spotlessApply {
176-
subprojects.each {
177-
if (it.name != platformProject) {
178-
it.afterEvaluate {
179-
def spotlessApplyTask = it.tasks.findByName("spotlessApply")
180-
dependsOn(spotlessApplyTask)
181-
}
182-
}
183-
}
159+
dependsOn subprojects.findAll { it.name != platformProject }.collect { "${it.path}:spotlessApply" }
184160
}
185161

186162
task subdependencies {
187-
subprojects.each {
188-
if (it.name != platformProject) {
189-
it.afterEvaluate {
190-
def dependenciesTask = it.tasks.findByName("dependencies")
191-
dependsOn(dependenciesTask)
192-
}
193-
}
194-
}
163+
dependsOn subprojects.findAll { it.name != platformProject }.collect { "${it.path}:dependencies" }
195164
}
196165

197166
project.tasks.getByPath("dependencies").finalizedBy("subdependencies")
167+
168+
wrapper {
169+
gradleVersion = "7.6.4"
170+
distributionType = Wrapper.DistributionType.ALL
171+
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
1+
# Maven Central does not support SHA-512 checksums. This disables the publish warning.
22
org.gradle.internal.publish.checksums.insecure=true
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-7.6.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-all.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

mdx-gateway-generator/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)