-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
103 lines (84 loc) · 2.67 KB
/
build.gradle
File metadata and controls
103 lines (84 loc) · 2.67 KB
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
plugins {
id "java"
id "jacoco"
id "application"
}
configurations {
koraBom
annotationProcessor.extendsFrom(koraBom); compileOnly.extendsFrom(koraBom); implementation.extendsFrom(koraBom)
api.extendsFrom(koraBom); testImplementation.extendsFrom(koraBom); testAnnotationProcessor.extendsFrom(koraBom)
}
dependencies {
koraBom platform("ru.tinkoff.kora:kora-parent:$koraVersion")
annotationProcessor "ru.tinkoff.kora:annotation-processors"
implementation "ru.tinkoff.kora:http-server-undertow"
implementation "ru.tinkoff.kora:json-module"
implementation "ru.tinkoff.kora:validation-module"
implementation "io.projectreactor:reactor-core:3.6.18" // For reactive examples (optional)
implementation "ru.tinkoff.kora:logging-logback"
implementation "ru.tinkoff.kora:config-hocon"
testAnnotationProcessor "ru.tinkoff.kora:annotation-processors"
testImplementation "ru.tinkoff.kora:test-junit5"
testImplementation "ru.tinkoff.kora:http-client-jdk"
testImplementation "org.skyscreamer:jsonassert:1.5.1"
testImplementation "com.squareup.okhttp:okhttp:2.7.5"
testImplementation "org.testcontainers:junit-jupiter:1.19.8"
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
application {
applicationName = "application"
mainClass = "ru.tinkoff.kora.example.http.server.Application"
applicationDefaultJvmArgs = ["-Dfile.encoding=UTF-8"]
}
distTar {
archiveFileName = "application.tar"
}
test {
dependsOn tasks.distTar
jvmArgs += [
"-XX:+TieredCompilation",
"-XX:TieredStopAtLevel=1",
]
environment([
"": ""
])
useJUnitPlatform()
testLogging {
showStandardStreams(true)
events("passed", "skipped", "failed")
exceptionFormat("full")
}
exclude("**/\$*")
jacoco {
excludes += ["**/generated/**", "**/Application*", "**/\$*"]
}
reports {
html.required = false
junitXml.required = false
}
}
compileJava {
options.encoding("UTF-8")
options.incremental(true)
options.fork = false
options.compilerArgs += [
"-Akora.app.submodule.enabled=true", // Only for integration tests
]
}
check.dependsOn jacocoTestReport
jacocoTestReport {
reports {
xml.required = true
html.outputLocation = layout.buildDirectory.dir("jacocoHtml")
}
classDirectories = files(classDirectories.files.collect { fileTree(dir: it, excludes: test.jacoco.excludes) })
}
javadoc {
options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption("html5", true)
}
}