-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
89 lines (77 loc) · 2.81 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
plugins {
id 'java-library'
id 'jacoco'
id 'application'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
group 'com.todaycurrency'
version '1.0-SNAPSHOT'
sourceCompatibility = '17'
application {
mainClass = 'com.todaycurrency.Program'
}
jar {
enabled = false
}
shadowJar {
mergeServiceFiles()
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.sparkjava:spark-core:2.9.4'
implementation group: 'org.slf4j', name: 'slf4j-log4j12', version: '2.0.16'
implementation group: 'com.google.inject', name: 'guice', version: '7.0.0'
implementation 'io.reactivex.rxjava3:rxjava:3.1.9'
implementation 'com.fasterxml.jackson.core:jackson-core:2.17.2'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.18.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
implementation 'com.fasterxml.jackson.module:jackson-module-parameter-names:2.17.2'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.0'
implementation 'org.apache.httpcomponents.client5:httpclient5:5.4'
implementation 'org.apache.httpcomponents.client5:httpclient5-fluent:5.4'
implementation 'com.netflix.archaius:archaius-core:0.7.12'
implementation 'commons-configuration:commons-configuration:1.10'
implementation 'org.apache.curator:curator-framework:5.7.0'
implementation group: 'com.newrelic.agent.java', name: 'newrelic-api', version: '8.14.0'
testImplementation "org.mockito:mockito-core:5.14.0"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.1'
}
tasks.withType(JavaCompile) {
options.compilerArgs += [
'-parameters'
]
options.encoding = 'UTF-8'
}
task stage(dependsOn: ['build', 'clean'])
build.mustRunAfter clean
test {
useJUnitPlatform()
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacoco {
toolVersion = "0.8.10"
reportsDirectory = file("$buildDir/reports/jacoco")
}
jacocoTestReport { // ./gradlew test jacocoTestReport from CLI
dependsOn test // tests are required to run before generating the report
group = "Reporting"
reports {
html.destination file("${buildDir}/reports/coverage")
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/todaycurrency/Program.*',
'**/todaycurrency/Application.*',
'**/sdk/ObjectMapperProvider.*',
'**/sdk/SparkWebServer.*',
'**/sdk/ApiApplication.*'
])
}))
}
}