dependencyManagement/build.gradle.kts (60 lines of code) (raw):
plugins {
`java-platform`
}
data class DependencySet(val group: String, val version: String, val modules: List<String>)
val DEPENDENCY_BOMS = listOf(
"com.fasterxml.jackson:jackson-bom:2.12.0",
"org.junit:junit-bom:5.8.2"
)
val DEPENDENCY_SETS = listOf(
DependencySet(
"com.fasterxml.jackson.datatype",
"2.12.0",
listOf("jackson-datatype-jsr310")
),
DependencySet(
"com.github.tomakehurst",
"2.26.3",
listOf("wiremock-jre8")
),
DependencySet(
"com.google.code.findbugs",
"3.0.2",
listOf("jsr305")
),
DependencySet(
"org.assertj",
"3.16.1",
listOf("assertj-core")
),
DependencySet(
"org.junit-pioneer",
"0.9.0",
listOf("junit-pioneer")
),
DependencySet(
"junit",
"4.13.1",
listOf("junit")
),
DependencySet(
"org.mockito",
"3.6.0",
listOf("mockito-all", "mockito-core", "mockito-junit-jupiter")
)
)
javaPlatform {
allowDependencies()
}
dependencies {
for (bom in DEPENDENCY_BOMS) {
api(platform(bom))
}
constraints {
for (set in DEPENDENCY_SETS) {
for (module in set.modules) {
api("${set.group}:${module}:${set.version}")
}
}
}
}