-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
46 lines (36 loc) · 1.2 KB
/
build.gradle
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
plugins {
id 'com.github.spotbugs' version '5.0.6'
id 'com.github.ben-manes.versions' version '0.42.0'
}
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)
}
// Define all library dependencies in one file for clarity
apply from:'dependencies.gradle'
subprojects {
apply plugin: "java"
apply plugin: "eclipse"
apply plugin: "com.github.spotbugs"
apply plugin: 'com.github.ben-manes.versions'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
spotbugsMain { reports {html { enabled = true } } }
// Reject all non stable versions
tasks.named("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(it.candidate.version)
}
}
// Standard libraries added to all projects
dependencies {
testImplementation libraries.junit
testImplementation libraries.mockito
implementation libraries.slf4jlog4j
implementation libraries.slf4j
}
}