forked from Netflix/maestro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
121 lines (102 loc) · 2.9 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
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
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.+'
classpath "com.github.spotbugs.snom:spotbugs-gradle-plugin:6.+"
}
}
apply from: "${rootDir}/dependencies.gradle"
allprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'com.diffplug.spotless'
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
spotless {
java {
googleJavaFormat()
removeUnusedImports() // removes any unused imports
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
test {
jvmArgs += ["-Djava.security.manager=allow"]
}
configurations.configureEach {
resolutionStrategy {
// Force 2.11.4 until upgrade is done
// Jackson is to be locked due to conversion issue with Double<>BigDecimal
force "com.fasterxml.jackson.core:jackson-databind:2.11.4"
force "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.11.4"
}
}
configurations {
compileClasspath {
resolutionStrategy.activateDependencyLocking()
}
runtimeClasspath {
resolutionStrategy.activateDependencyLocking()
}
annotationProcessor {
resolutionStrategy.activateDependencyLocking()
}
}
}
configure(allprojects - project(':cockroachdb-persistence') - project(':netflix-sel')) {
apply plugin: 'checkstyle'
apply plugin: 'pmd'
apply plugin: 'com.github.spotbugs'
checkstyle {
checkstyleMain.enabled = true
checkstyleMain.source = fileTree("src/main/java")
checkstyleTest.enabled = false
}
pmd {
toolVersion = "6.21.0"
pmdTest.enabled = false
consoleOutput = true
rulesMinimumPriority = 5
ruleSetFiles = files("${rootDir}/config/pmd/ruleset.xml")
ruleSets = []
}
spotbugs {
ignoreFailures = true
}
group = 'com.netflix.maestro'
// Print out full stack traces when our tests fail to assist debugging (e.g., when scanning Jenkins console output)
tasks.withType(Test).configureEach {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
}
dependencies {
compileOnly lombokDep
annotationProcessor lombokDep
testCompileOnly lombokDep
testAnnotationProcessor lombokDep
}
}
configure([project(':maestro-common'), project(':maestro-engine')]) {
apply plugin: 'java-library'
apply plugin: 'java-test-fixtures'
checkstyle {
checkstyleTestFixtures.enabled = true
}
pmd {
pmdTestFixtures.enabled = true
}
}