2019-05-30 08:02:24 +00:00
|
|
|
plugins {
|
2021-08-28 19:01:33 +00:00
|
|
|
id 'com.github.spotbugs' version '4.7.3'
|
2021-06-13 11:09:22 +00:00
|
|
|
id 'com.github.ben-manes.versions' version '0.39.0'
|
2019-05-30 08:02:24 +00:00
|
|
|
}
|
|
|
|
|
2021-10-04 21:27:19 +00:00
|
|
|
def isNonStable = { String version ->
|
|
|
|
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) }
|
|
|
|
def regex = /^[0-9,.v-]+(-r)?$/
|
|
|
|
return !stableKeyword && !(version ==~ regex)
|
|
|
|
}
|
2017-08-13 13:38:01 +00:00
|
|
|
|
|
|
|
// Define all library dependencies in one file for clarity
|
|
|
|
apply from:'dependencies.gradle'
|
|
|
|
|
|
|
|
subprojects {
|
|
|
|
apply plugin: "java"
|
|
|
|
apply plugin: "eclipse"
|
2019-05-30 08:02:24 +00:00
|
|
|
apply plugin: "com.github.spotbugs"
|
2019-10-12 00:28:49 +00:00
|
|
|
apply plugin: 'com.github.ben-manes.versions'
|
2017-08-13 13:38:01 +00:00
|
|
|
|
2019-05-03 12:16:42 +00:00
|
|
|
sourceCompatibility = 1.8
|
2017-08-15 06:14:20 +00:00
|
|
|
targetCompatibility = 1.8
|
2017-08-13 13:38:01 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
2021-10-04 21:27:19 +00:00
|
|
|
spotbugsMain { reports {html { enabled = true } } }
|
|
|
|
|
|
|
|
// Reject all non stable versions
|
|
|
|
tasks.named("dependencyUpdates").configure {
|
|
|
|
rejectVersionIf {
|
|
|
|
isNonStable(it.candidate.version)
|
2020-03-04 21:47:35 +00:00
|
|
|
}
|
2019-05-30 08:02:24 +00:00
|
|
|
}
|
|
|
|
|
2017-08-13 13:38:01 +00:00
|
|
|
// Standard libraries added to all projects
|
|
|
|
dependencies {
|
2019-12-08 15:52:29 +00:00
|
|
|
testImplementation libraries.junit
|
|
|
|
testImplementation libraries.mockito
|
2017-08-13 13:38:01 +00:00
|
|
|
|
2019-12-08 15:52:29 +00:00
|
|
|
implementation libraries.slf4jlog4j
|
|
|
|
implementation libraries.slf4j
|
2017-08-13 13:38:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|