-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
90 lines (78 loc) · 2.18 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
plugins {
kotlin("multiplatform").version("1.6.21")
`java-library`
`maven-publish`
signing
}
repositories {
mavenLocal()
mavenCentral()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}
}
// this is the version used for building snapshots
// .GITHUB_RUN_NUMBER-snapshot will be appended
val snapshotBase = "2.0.0"
val githubRunNumber = System.getenv("GITHUB_RUN_NUMBER")
val snapshotVersion = when (githubRunNumber) {
null -> "$snapshotBase-LOCAL"
else -> "$snapshotBase.${githubRunNumber}-SNAPSHOT"
}
val releaseVersion = System.getenv("RELEASE_VERSION")
val isRelease = releaseVersion != null
group = "io.kotest.extensions"
version = releaseVersion ?: snapshotVersion
kotlin {
targets {
jvm {
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
js {
browser()
nodejs()
}
}
sourceSets {
val commonMain by getting {
dependencies {
api(libs.kotest.property)
api(libs.kotest.property.datetime)
implementation(libs.univocity.parsers)
implementation(libs.kotlinx.datetime)
}
}
val jvmTest by getting {
dependencies {
implementation(libs.kotest.runner.junit5)
}
}
}
}
tasks.withType<Test> {
useJUnitPlatform()
filter {
isFailOnNoMatchingTests = false
}
testLogging {
showExceptions = true
showStandardStreams = true
events = setOf(
org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED,
org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED,
org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED,
org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_OUT,
org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_ERROR
)
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
}
apply(from = "./publish-mpp.gradle.kts")
// TODO: Remove me after https://youtrack.jetbrains.com/issue/KT-49109 is fixed
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.0.0"
}