-
Notifications
You must be signed in to change notification settings - Fork 51
/
build.gradle
131 lines (112 loc) · 3.09 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
122
123
124
125
126
127
128
129
130
buildscript {
repositories {
maven {
url "https://repo.maven.apache.org/maven2/"
metadataSources {
gradleMetadata()
mavenPom()
artifact()
}
}
maven {
url "https://plugins.gradle.org/m2/"
metadataSources {
gradleMetadata()
mavenPom()
artifact()
}
}
}
dependencies {
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.9.1"
classpath "com.diffplug.spotless:spotless-lib:2.9.0"
classpath "com.diffplug.spotless:spotless-lib-extra:2.9.0"
classpath "com.github.spotbugs:com.github.spotbugs.gradle.plugin:4.8.0"
}
}
ext {
spring_web_version = "2.7.8"
spark_version = "3.1.1"
ok_http3_version = "4.11.0"
junit_version = "5.11.0"
}
group = 'com.linkedin.openhouse'
subprojects {
buildDir = "${rootProject.buildDir}/${project.name}"
group = rootProject.group
version = rootProject.version
}
allprojects {
apply plugin: "com.diffplug.spotless"
apply plugin: "com.github.spotbugs"
group = 'com.linkedin.openhouse'
repositories {
maven {
url "https://repo.maven.apache.org/maven2/"
metadataSources {
gradleMetadata()
mavenPom()
artifact()
}
}
}
configurations.all {
resolutionStrategy {
force 'com.fasterxml.jackson:jackson-bom:2.13.4'
force 'com.fasterxml.jackson.core:jackson-databind:2.13.4'
force 'org.apache.orc:orc-core:1.8.3'
force 'com.google.guava:guava:31.1-jre'
}
}
plugins.withType(JavaPlugin) {
dependencies {
testImplementation "org.assertj:assertj-core:3.24.2" //assertions library
testImplementation "org.junit.jupiter:junit-jupiter-api:" + junit_version
testImplementation "org.junit.jupiter:junit-jupiter-params:" + junit_version
testImplementation "org.mockito:mockito-core:4.11.0"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:" + junit_version
}
tasks.withType(Test) {
useJUnitPlatform()
}
spotless {
enforceCheck = false
java {
target '**/*.java'
targetExclude 'client/**', 'build/**'
importOrder('', 'static ')
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
googleJavaFormat('1.7')
}
}
spotbugs {
includeFilter = rootProject.file('gradle/spotbugs/spotbugsInclude.xml')
excludeFilter = rootProject.file('gradle/spotbugs/spotbugsExclude.xml')
ignoreFailures = true
}
spotbugsMain {
reports {
html {
required = true
outputLocation = file("$buildDir/reports/spotbugs/main/spotbugs.html")
}
}
}
spotbugsTest.enabled = false
}
afterEvaluate {
for (def task in it.tasks) {
if (task != rootProject.tasks.CopyGitHooksTask) {
task.dependsOn rootProject.tasks.CopyGitHooksTask
}
}
}
}
// Local Git Hooks cannot be shared, as .git directory is gitignore'd.
tasks.register('CopyGitHooksTask', Copy) {
println 'Make the git hook available in .git/hooks directory.'
from file('scripts/git-hooks')
into file('.git/hooks/')
}