Skip to content

Commit c899757

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

18 files changed

Lines changed: 347 additions & 500 deletions

.clothesline.yaml

Whitespace-only changes.

.vogue.yml

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

build.gradle

Lines changed: 88 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
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
88
}
99

10+
group "com.mx.path-mdx-model"
11+
description "Path MDX Model"
1012
version "20.2.3" // x-release-please-version
1113

1214
def platformProject = "platform"
@@ -18,58 +20,30 @@ def publishedProjects = [
1820
"mdx-web"
1921
]
2022

21-
allprojects {
22-
if (it.name != platformProject) {
23-
apply plugin: "java"
24-
}
25-
26-
group "com.mx.path-mdx-model"
27-
description "Path MDX Model"
23+
subprojects {
24+
group rootProject.group
25+
description rootProject.description
2826
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-
}
4027

4128
ext {
42-
pathSDKVersion = "[6.0,7.0)"
43-
springVersion = "3.5.8"
29+
pathCoreVersion = "[6.0,7.0)"
30+
springVersion = "3.5.11"
4431
}
45-
}
4632

47-
subprojects {
4833
if (it.name != platformProject) {
49-
apply plugin: "java-library"
50-
apply plugin: "groovy"
5134
apply plugin: "com.github.mxenabled.coppuccino"
5235
apply plugin: "com.github.mxenabled.vogue"
36+
apply plugin: "groovy"
37+
apply plugin: "java-library"
5338
apply plugin: "io.freefair.lombok"
5439
apply plugin: "com.netflix.nebula.maven-resolved-dependencies"
5540

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
41+
java {
42+
toolchain {
43+
languageVersion = JavaLanguageVersion.of(17)
7244
}
45+
withSourcesJar()
46+
withJavadocJar()
7347
}
7448

7549
coppuccino {
@@ -83,78 +57,89 @@ subprojects {
8357
dependencyUpdatesOutputDir = "${projectDir}/build/dependencyUpdates"
8458
}
8559

86-
task sourcesJar(type: Jar, dependsOn: classes) {
87-
classifier = "sources"
88-
from sourceSets.main.allSource
60+
repositories {
61+
mavenCentral()
62+
mavenLocal()
8963
}
9064

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

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

102-
if (publishedProjects.contains(it.name)) {
103-
apply plugin: "maven-publish"
104-
apply plugin: "signing"
84+
if (publishedProjects.contains(it.name)) {
85+
apply plugin: "maven-publish"
86+
apply plugin: "signing"
10587

88+
if (it.name != platformProject) {
10689
publishing {
10790
publications {
10891
maven(MavenPublication) {
10992
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-
}
14293
}
14394
}
14495
}
96+
}
97+
98+
publishing {
99+
publications.withType(MavenPublication).configureEach {
100+
pom {
101+
groupId = project.group
102+
artifactId = project.name
103+
name = project.name
104+
description = project.description
105+
url = "https://github.com/mxenabled/path-mdx-model"
106+
107+
developers {
108+
developer {
109+
name = "MX"
110+
email = "path@mx.com"
111+
organization = "MX Technologies Inc."
112+
url = "http://www.mx.com"
113+
}
114+
}
115+
116+
licenses {
117+
license {
118+
name = "Proprietary"
119+
url = "https://github.com/mxenabled/path-mdx-model/blob/master/LICENSE"
120+
distribution = "repo"
121+
}
122+
}
145123

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")
124+
scm {
125+
connection = "scm:git:git@github.com:mxenabled/path-mdx-model.git"
126+
url = "https://github.com/mxenabled/path-mdx-model/tree/master"
127+
}
155128
}
156129
}
157130
}
131+
132+
signing {
133+
def signingKey = findProperty("signingKey")
134+
def signingPassword = findProperty("signingKeyPassword")
135+
if (signingKey != null && signingKey != "") {
136+
useInMemoryPgpKeys(signingKey, signingPassword)
137+
sign publishing.publications
138+
logger.lifecycle("Configuring signing for ${project.name}")
139+
} else {
140+
logger.lifecycle("Skipping artifact signing for ${project.name} - missing signing key")
141+
}
142+
}
158143
}
159144
}
160145

@@ -173,25 +158,16 @@ nexusPublishing {
173158
}
174159

175160
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-
}
161+
dependsOn subprojects.findAll { it.name != platformProject }.collect { "${it.path}:spotlessApply" }
184162
}
185163

186164
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-
}
165+
dependsOn subprojects.findAll { it.name != platformProject }.collect { "${it.path}:dependencies" }
195166
}
196167

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

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)