-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
116 lines (95 loc) · 2.46 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
plugins {
id "java"
id "jacoco"
id "application"
id "com.diffplug.spotless" version "6.19.0"
}
group = groupId
version = koraVersion
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
repositories {
mavenCentral()
}
configurations {
koraBom
annotationProcessor.extendsFrom(koraBom)
compileOnly.extendsFrom(koraBom)
implementation.extendsFrom(koraBom)
api.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:micrometer-module"
implementation "ru.tinkoff.kora:config-hocon"
implementation "ru.tinkoff.kora:logging-logback"
testImplementation "org.mockito:mockito-core:5.7.0"
testImplementation "ru.tinkoff.kora:test-junit5"
testImplementation "org.testcontainers:junit-jupiter:1.19.8"
}
application {
applicationName = "application"
mainClassName = "ru.tinkoff.kora.java.Application"
applicationDefaultJvmArgs = ["-Dfile.encoding=UTF-8"]
}
distTar {
archiveFileName = "application.tar"
}
//noinspection GroovyAssignabilityCheck
run {
environment([
"": "",
])
}
test.dependsOn tasks.distTar
test {
jvmArgs += [
"-XX:+TieredCompilation",
"-XX:TieredStopAtLevel=1",
]
environment([
"": ""
])
useJUnitPlatform()
testLogging {
showStandardStreams(true)
events("passed", "skipped", "failed")
exceptionFormat("full")
}
jacoco {
excludes += ["**/Application*"]
}
reports {
html.required = false
junitXml.required = false
}
}
check.dependsOn jacocoTestReport
jacocoTestReport {
reports {
xml.required = true
html.outputLocation = layout.buildDirectory.dir("jacocoHtml")
}
}
compileJava {
options.encoding("UTF-8")
options.incremental(true)
options.fork = false
}
javadoc {
options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption("html5", true)
}
}
spotless {
java {
encoding("UTF-8")
importOrder()
removeUnusedImports()
eclipse("4.21").configFile("${rootDir}/config/codestyle.xml")
targetExclude("**/proto/**", "**/generated/openapi/**", "**/generated/soap/**", "**/generated/grpc/**",)
}
}