-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle.kts
76 lines (60 loc) · 2.12 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
plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "1.8.0"
id("application")
id("jacoco")
}
subprojects {
plugins.apply {
apply("java")
apply("kotlin")
apply("jacoco")
apply("maven-publish")
apply("org.gradle.java-library")
apply("org.gradle.signing")
}
}
group = "com.itangcent"
version = properties["project_version"]!!
repositories {
mavenCentral()
}
dependencies {
testImplementation("org.jetbrains.kotlin:kotlin-test")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0")
// https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation("com.google.code.gson:gson:2.8.9")
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation("org.apache.commons:commons-lang3:3.9")
// https://mvnrepository.com/artifact/commons-io/commons-io
implementation("commons-io:commons-io:2.7")
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-reflect
implementation("org.jetbrains.kotlin:kotlin-reflect:1.8.0")
implementation("com.google.inject:guice:4.2.2")
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api
testImplementation("org.junit.jupiter:junit-jupiter-params:${properties["junit_version"]}")
testImplementation("org.junit.jupiter:junit-jupiter-api:${properties["junit_version"]}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${properties["junit_version"]}")
}
tasks.getByName<Test>("test") {
useJUnitPlatform()
}
kotlin {
jvmToolchain(11)
}
tasks.create("codeCoverageReport", JacocoReport::class) {
executionData(
fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
)
subprojects.forEach {
sourceDirectories.from(it.file("src/main/kotlin"))
classDirectories.from(it.file("build/classes/kotlin/main"))
}
reports {
xml.required.set(true)
xml.outputLocation.set(file("${buildDir}/reports/jacoco/report.xml").apply { parentFile.mkdirs() })
html.required.set(false)
csv.required.set(false)
}
generate()
}