blob: ed15d3db330169be98bd136929aebd20b950d65e (
plain)
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
|
import org.jetbrains.kotlin.gradle.plugin.*
buildscript {
dependencies {
classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.17.0")
}
}
plugins {
kotlin("multiplatform")
}
apply(plugin = "kotlinx-atomicfu")
repositories {
mavenCentral()
}
kotlin {
targets {
jvm {
compilations.all {
kotlinOptions.jvmTarget = "1.8"
}
testRuns["test"].executionTask.configure {
useJUnit()
}
}
js {
nodejs()
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-common")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
val jvmMain by getting {
dependencies {
implementation(kotlin("stdlib"))
}
}
val jvmTest by getting {
dependencies {
implementation(kotlin("test-junit"))
}
}
val jsMain by getting {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-js")
}
}
val jsTest by getting {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-test-js")
}
}
}
tasks.named("compileTestKotlinJvm") {
doLast {
file("$buildDir/test_compile_jvm_classpath.txt").writeText(
targets["jvm"].compilations["test"].compileDependencyFiles.joinToString("\n")
)
}
}
tasks.named("jvmTest") {
doLast {
file("$buildDir/test_runtime_jvm_classpath.txt").writeText(
(targets["jvm"].compilations["test"] as KotlinCompilationToRunnableFiles).runtimeDependencyFiles.joinToString("\n")
)
}
}
tasks.named("compileTestKotlinJs") {
doLast {
file("$buildDir/test_compile_js_classpath.txt").writeText(
targets["js"].compilations["test"].compileDependencyFiles.joinToString("\n")
)
}
}
}
|