-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle.kts
52 lines (41 loc) · 1.05 KB
/
build.gradle.kts
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.5.30"
application
jacoco
}
group = "com.baidu"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind:2.12.5")
implementation("commons-validator:commons-validator:1.7")
implementation("org.apache.commons:commons-lang3:3.12.0")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5:1.5.21")
}
jacoco {
toolVersion = "0.8.7"
}
tasks.test {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // tests are required to run before generating the report
reports {
xml.required.set(false)
csv.required.set(false)
html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml"))
}
}
tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8"
}
tasks.withType<JavaCompile>() {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
application {
}