-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
88 lines (80 loc) · 2.02 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
import org.jetbrains.kotlin.ir.backend.js.compile
plugins {
kotlin("multiplatform") version "2.0.10"
id("convention.publication")
id("org.jetbrains.kotlinx.kover") version "0.9.1"
// id("java-library")
// jacoco
}
repositories {
mavenCentral()
}
group = "io.github.mackimaow"
version = "2.0.0"
kotlin {
jvm()
js(IR) {
browser {
testTask {
useKarma {
useChromeHeadless()
}
}
}
}
linuxX64()
mingwX64()
macosX64()
macosArm64()
iosX64()
iosArm64()
iosSimulatorArm64()
// Apply the default hierarchical project structure
applyDefaultHierarchyTemplate()
sourceSets {
val commonMain by getting
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4")
}
}
val jvmMain by getting
val jvmTest by getting
val jsMain by getting
val jsTest by getting
val nativeMain by getting
val nativeTest by getting
}
}
// Jacoco plugin
//
//jacoco {
// toolVersion = "0.8.10" // Specify the JaCoCo version
// reportsDirectory = layout.buildDirectory.dir("reports/jacoco")
//}
//
//tasks.getByName("jvmTest") {
// finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
//}
//
//tasks.jacocoTestReport {
// dependsOn("jvmTest")
//
// val coverageSourceDirs = files(
// layout.projectDirectory.dir("src/commonMain/kotlin"),
// layout.projectDirectory.dir("src/jvmMain/kotlin")
// )
//
// val classFiles = fileTree(layout.buildDirectory.dir("classes/kotlin/jvm"))
// classDirectories.setFrom(classFiles)
// sourceDirectories.setFrom(coverageSourceDirs)
//
// executionData
// .setFrom(layout.buildDirectory.file("jacoco/jvmTest.exec"))
//
// reports {
// xml.required = true
// html.required = true
// }
//}