-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathkotlin-jvm-conventions.gradle.kts
46 lines (38 loc) · 1.12 KB
/
kotlin-jvm-conventions.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
/*
* Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
// Platform-specific configuration to compile JVM modules
import org.gradle.api.*
plugins {
kotlin("jvm")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
}
if (rootProject.extra.get("jvm_ir_enabled") as Boolean) {
kotlin.target.compilations.configureEach {
kotlinOptions.useIR = true
}
}
dependencies {
testImplementation(kotlin("test"))
// Workaround to make addSuppressed work in tests
testImplementation(kotlin("reflect"))
testImplementation(kotlin("stdlib-jdk7"))
testImplementation(kotlin("test-junit"))
testImplementation("junit:junit:${version("junit")}")
}
tasks.compileKotlin {
kotlinOptions {
freeCompilerArgs += listOf("-Xexplicit-api=strict")
}
}
tasks.withType<Test> {
testLogging {
showStandardStreams = true
events("passed", "failed")
}
val stressTest = project.properties["stressTest"]
if (stressTest != null) systemProperties["stressTest"] = stressTest
}