forked from MarquezProject/marquez
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
118 lines (99 loc) · 2.6 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
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
plugins {
id 'application'
id 'checkstyle'
id 'jacoco'
id 'java'
id 'com.adarshr.test-logger' version '1.6.0'
id 'com.diffplug.gradle.spotless' version '3.20.0'
id 'com.github.jk1.dependency-license-report' version '1.3'
id 'com.github.johnrengelman.shadow' version '4.0.4'
id 'net.researchgate.release' version '2.6.0'
}
repositories {
mavenCentral()
}
dependencies {
compile 'io.dropwizard.metrics:metrics-jdbi3:4.1.0-rc3'
compile 'io.dropwizard.modules:dropwizard-flyway:1.3.0-4'
compile 'io.dropwizard:dropwizard-core:1.3.9'
compile 'io.dropwizard:dropwizard-jdbi3:1.3.9'
compile 'io.dropwizard:dropwizard-json-logging:1.3.9'
compile 'org.jdbi:jdbi3-postgres:3.6.0'
compile 'org.jdbi:jdbi3-sqlobject:3.6.0'
compile 'org.postgresql:postgresql:42.2.5'
compileOnly 'org.projectlombok:lombok:1.18.6'
annotationProcessor 'org.projectlombok:lombok:1.18.6'
testCompile 'junit:junit:4.12'
testCompile 'io.dropwizard:dropwizard-testing:1.3.9'
testCompile 'org.jdbi:jdbi3-testing:3.3.0'
testCompile 'org.mockito:mockito-core:2.25.1'
}
compileJava {
options.incremental = true
options.compilerArgs << '-parameters'
}
compileTestJava {
options.incremental = true
options.compilerArgs << '-parameters'
}
task testUnit(type: Test) {
useJUnit {
includeCategories 'marquez.UnitTests'
}
}
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";
checkstyle {
toolVersion = '8.12'
configFile = rootProject.file('checkstyle.xml')
}
task checkstyle(type: Checkstyle) {
reports {
xml.enabled = true
html.enabled = true
html.destination = file("${reportsDir}/checkstyle")
}
}
checkstyleMain {
source = 'src/main/java'
}
checkstyleTest {
source = 'src/test/java'
}
def coverageDir = "${reportsDir}/coverage";
jacoco {
toolVersion = '0.8.2'
reportsDir = file(coverageDir)
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
html.destination = file(coverageDir)
}
}