aboutsummaryrefslogtreecommitdiffstats
path: root/buildSrc/src/main/kotlin/kotlin-jvm-conventions.gradle.kts
blob: c7744f8702b72d22027b4ab137e9bcc08da33a16 (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
/*
 * 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
}

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
}