-
Notifications
You must be signed in to change notification settings - Fork 187
/
build.gradle.kts
53 lines (46 loc) · 1.65 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
import com.diffplug.gradle.spotless.SpotlessExtension
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
import org.jetbrains.kotlin.gradle.targets.jvm.tasks.KotlinJvmTest
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.kotlin.multiplaform) apply false
alias(libs.plugins.kotlinx.serialization) apply false
alias(libs.plugins.kotlinx.binary.validator) apply false
alias(libs.plugins.maven.publish) apply false
alias(libs.plugins.spotless) apply false
alias(libs.plugins.dokka)
}
subprojects {
apply(plugin = "com.diffplug.spotless")
configure<SpotlessExtension> {
kotlin {
target("**/*.kt")
trimTrailingWhitespace()
endWithNewline()
}
}
tasks.withType<Test> {
testLogging {
events(STARTED, PASSED, SKIPPED, FAILED)
exceptionFormat = TestExceptionFormat.FULL
showStandardStreams = false
}
}
tasks.withType<KotlinJvmTest>().configureEach {
environment("LIB_ROOT", rootDir)
}
tasks.withType<KotlinNativeTest>().configureEach {
environment("SIMCTL_CHILD_LIB_ROOT", rootDir)
environment("LIB_ROOT", rootDir)
}
tasks.withType<KotlinJsTest>().configureEach {
environment("LIB_ROOT", rootDir.toString())
}
}
tasks.withType<DokkaMultiModuleTask>() {
outputDirectory.set(projectDir.resolve("docs"))
}