forked from MarquezProject/marquez
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
145 lines (122 loc) · 3.39 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
plugins {
id 'application'
id 'checkstyle'
id 'jacoco'
id 'java'
id 'com.adarshr.test-logger' version '2.0.0'
id 'com.diffplug.gradle.spotless' version '3.27.0'
id 'com.github.jk1.dependency-license-report' version '1.11'
id 'com.github.johnrengelman.shadow' version '5.1.0'
id 'net.researchgate.release' version '2.8.0'
}
repositories {
mavenCentral()
}
ext {
dropwizardVersion = '2.0.8'
jdbi3Version = '3.12.2'
lombokVersion = '1.18.12'
prometheusVersion = '0.8.0'
}
dependencies {
compile "io.dropwizard:dropwizard-core:${dropwizardVersion}"
compile "io.dropwizard:dropwizard-jdbi3:${dropwizardVersion}"
compile "io.dropwizard:dropwizard-json-logging:${dropwizardVersion}"
compile "io.prometheus:simpleclient:${prometheusVersion}"
compile "io.prometheus:simpleclient_dropwizard:${prometheusVersion}"
compile "io.prometheus:simpleclient_hotspot:${prometheusVersion}"
compile "io.prometheus:simpleclient_servlet:${prometheusVersion}"
compile "org.jdbi:jdbi3-postgres:${jdbi3Version}"
compile "org.jdbi:jdbi3-sqlobject:${jdbi3Version}"
compile 'com.google.guava:guava:28.0-jre'
compile 'org.flywaydb:flyway-core:6.3.0'
compile 'org.postgresql:postgresql:42.2.5'
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testCompile "io.dropwizard:dropwizard-testing:${dropwizardVersion}"
testCompile "org.jdbi:jdbi3-testing:${jdbi3Version}"
testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:3.11.1'
testCompile 'org.mockito:mockito-core:3.3.3'
testCompile 'org.testcontainers:postgresql:1.13.0'
}
compileJava {
options.incremental = true
options.compilerArgs << '-parameters'
}
compileTestJava {
options.incremental = true
options.compilerArgs << '-parameters'
}
task testUnit(type: Test) {
useJUnit {
includeCategories 'marquez.UnitTests'
}
}
task testIntegration(type: Test) {
useJUnit {
includeCategories 'marquez.IntegrationTests'
}
}
task testDataAccess(type: Test) {
useJUnit {
includeCategories 'marquez.DataAccessTests'
}
}
mainClassName = 'marquez.MarquezApp'
shadowJar {
baseName = project.name
classifier = ''
version = project.version
transform(ServiceFileTransformer)
manifest {
attributes(
'Created-By': "Gradle ${gradle.gradleVersion}",
'Built-By': System.getProperty('user.name'),
'Build-Jdk': System.getProperty('java.version'),
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Main-Class': mainClassName)
}
}
runShadow {
args = ['server', 'config.yml']
}
spotless {
java {
googleJavaFormat()
removeUnusedImports()
}
}
def reportsDir = "${buildDir}/reports";
def checkstyleDir = "${reportsDir}/checkstyle";
checkstyle {
toolVersion = '8.12'
configFile = rootProject.file('checkstyle.xml')
}
task checkstyle(type: Checkstyle) {
reports {
xml.enabled = true
html.enabled = true
html.destination = file(checkstyleDir)
}
}
checkstyleMain {
source = 'src/main/java'
}
checkstyleTest {
source = 'src/test/java'
}
def coverageDir = "${reportsDir}/coverage";
jacoco {
toolVersion = '0.8.5'
reportsDir = file(coverageDir)
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
html.destination = file(coverageDir)
}
}