-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
49 lines (39 loc) · 1.17 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
47
48
49
plugins {
alias libs.plugins.dependencycheck
alias libs.plugins.errorprone
alias libs.plugins.versions
}
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)
}
dependencyCheck {
scanConfigurations = ['runtimeClasspath']
}
subprojects {
apply plugin: "java"
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'net.ltgt.errorprone'
java {
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
}
// Reject all non stable versions in dependency check
tasks.named("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(it.candidate.version)
}
}
// Standard libraries added to all projects
dependencies {
errorprone(libs.errorprone.core)
compileOnly libs.errorprone.annotations
testImplementation libs.junit
testImplementation libs.mockito.core
implementation libs.slf4j.api
}
}