-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
209 lines (178 loc) · 6.02 KB
/
build.gradle
File metadata and controls
209 lines (178 loc) · 6.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
plugins {
id "com.github.mxenabled.coppuccino" version "6.+" apply false
id "com.github.mxenabled.vogue" version "3.+" apply false
id "idea"
id "io.freefair.lombok" version "8.+" apply false
id "io.github.gradle-nexus.publish-plugin" version "1.1.+"
}
group "com.mx.path-core"
description "MX Path Core"
version "6.0.3" // x-release-please-version
def platformProject = "platform"
def publishedProjects = [
platformProject,
"common",
"context",
"gateway",
"gateway-generator",
"http",
"messaging",
"testing",
"utilities"
]
subprojects {
group rootProject.group
description rootProject.description
version rootProject.version
if (it.name != platformProject) {
apply plugin: "com.github.mxenabled.coppuccino"
apply plugin: "com.github.mxenabled.vogue"
apply plugin: "groovy"
apply plugin: "java-library"
apply plugin: "io.freefair.lombok"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
withSourcesJar()
withJavadocJar()
}
coppuccino {
rootDir = "${projectDir}/"
}
vogue {
dependencyUpdatesOutputDir = "${projectDir}/build/dependencyUpdates"
}
repositories {
mavenCentral()
mavenLocal()
}
ext {
mockitoVersion = "[5.0,6.0)"
spockVersion = "2.4-M6-groovy-3.0"
junitVersion = "5.14.0"
openTracingVersion = "[0.33,0.34)"
slf4jVersion = "1.7.30"
}
dependencies {
constraints {
// --- Shared Libraries ---
api "com.google.code.gson:gson:[2.13.0,3.0.0)"
api "io.opentracing:opentracing-api:${project.ext.openTracingVersion}"
api "io.opentracing:opentracing-noop:${project.ext.openTracingVersion}"
api "io.opentracing:opentracing-util:${project.ext.openTracingVersion}"
api "com.google.guava:guava:[32.0,33.0)"
api "com.github.rholder:guava-retrying:[2.0,3.0)"
api "com.datadoghq:dd-trace-api:1.38.0"
api "org.apache.httpcomponents:httpclient:4.5.14"
api "org.slf4j:slf4j-api:${project.ext.slf4jVersion}"
// -----------------------------------------------------------------
// These re-add JAXB classes needed for SOAP interaction.
// Version changes to any of these need to be tested (not just built)
// with an app that uses SOAP.
// -----------------------------------------------------------------
api "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4!!"
api "jakarta.xml.soap:jakarta.xml.soap-api:3.0.2!!"
api "com.sun.xml.bind:jaxb-impl:4.0.6!!"
api "org.glassfish.jaxb:jaxb-runtime:4.0.6!!"
// --- Shared Testing Libraries ---
api "io.opentracing:opentracing-mock:${project.ext.openTracingVersion}"
api "org.slf4j:slf4j-simple:${project.ext.slf4jVersion}"
// --- Security Overrides ---
// Pulled in by org.apache.httpcomponents:httpclient:4.5.14
api("commons-codec:commons-codec:1.14") {
because "Fixes Low Severity vulnerability SNYK-JAVA-COMMONSCODEC-561518"
}
}
testImplementation "org.mockito:mockito-inline:${project.ext.mockitoVersion}"
testImplementation "org.spockframework:spock-core:${project.ext.spockVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${project.ext.junitVersion}"
}
test { useJUnitPlatform() }
compileJava { options.compilerArgs << "-parameters" }
javadoc {
classpath = configurations.compileClasspath
options {
setMemberLevel JavadocMemberLevel.PUBLIC
setAuthor true
}
}
}
if (publishedProjects.contains(it.name)) {
apply plugin: "maven-publish"
apply plugin: "signing"
if (it.name != platformProject) {
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
}
}
publishing {
publications.withType(MavenPublication).configureEach {
pom {
groupId = project.group
artifactId = project.name
name = project.name
description = project.description
url = "https://github.com/mxenabled/path-core"
developers {
developer {
name = "MX"
email = "path@mx.com"
organization = "MX Technologies Inc."
url = "http://www.mx.com"
}
}
licenses {
license {
name = "Proprietary"
url = "https://github.com/mxenabled/path-core/blob/master/LICENSE"
distribution = "repo"
}
}
scm {
connection = "scm:git:git@github.com:mxenabled/path-core.git"
url = "https://github.com/mxenabled/path-core/tree/master"
}
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingKeyPassword")
if (signingKey != null && signingKey != "") {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications
logger.lifecycle("Configuring signing for ${project.name}")
} else {
logger.lifecycle("Skipping artifact signing for ${project.name} - missing signing key")
}
}
}
}
nexusPublishing {
def ossrhUserName = findProperty("ossrhUserName")
def ossrhToken = findProperty("ossrhToken")
repositories {
central {
nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
snapshotRepositoryUrl = uri("https://central.sonatype.com/repository/maven-snapshots/")
username = ossrhUserName
password = ossrhToken
}
}
}
task spotlessApply {
dependsOn subprojects.findAll { it.name != platformProject }.collect { "${it.path}:spotlessApply" }
}
task subdependencies {
dependsOn subprojects.findAll { it.name != platformProject }.collect { "${it.path}:dependencies" }
}
project.tasks.getByPath("dependencies").finalizedBy("subdependencies")
wrapper {
gradleVersion = "7.6.4"
distributionType = Wrapper.DistributionType.ALL
}