-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
98 lines (78 loc) · 1.98 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
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.shadow)
alias(libs.plugins.serialization)
application
publishing
signing
id("jacoco-report-aggregation")
}
jacoco {
toolVersion = "0.8.8"
}
dependencies {
implementation("cc.unitmesh:unit-core:0.3.2")
implementation(libs.clikt)
implementation(libs.kotlin.stdlib)
implementation(libs.serialization.json)
// Logging
implementation(libs.logging.slf4j.api)
implementation(libs.logging.logback.classic)
implementation(libs.cf.prompt.script)
testImplementation(kotlin("test"))
testImplementation(libs.bundles.test)
}
tasks.test {
useJUnitPlatform()
}
repositories {
mavenLocal()
mavenCentral()
google()
}
group = "cc.unitmesh"
version = "0.3.3"
java.sourceCompatibility = JavaVersion.VERSION_11
java.targetCompatibility = JavaVersion.VERSION_11
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "11"
}
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
tasks.test {
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // tests are required to run before generating the report
}
tasks.jacocoTestReport {
reports {
xml.required.set(true)
csv.required.set(false)
html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml"))
}
}
application {
mainClass.set("cc.unitmesh.eval.EvalKt")
}
tasks {
shadowJar {
manifest {
attributes(Pair("Main-Class", "cc.unitmesh.eval.EvalKt"))
}
dependencies {
exclude(dependency("org.junit.jupiter:.*:.*"))
exclude(dependency("org.junit:.*:.*"))
exclude(dependency("junit:.*:.*"))
}
}
}