aboutsummaryrefslogtreecommitdiff
path: root/gradle/compile-options.gradle
blob: b6ce53259f2f04d6afc8987a1b77af0f1c371f09 (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

/*
 * Copyright 2017-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 */

ext.configureKotlin = { isMultiplatform ->
    if (rootProject.ext.jvm_ir_enabled) {
        println "Using JVM IR compiler for project $project.name"
        if (isMultiplatform) {
            kotlin.jvm().compilations.all {
                kotlinOptions.useIR = true
            }
        } else {
            kotlin.target.compilations.all {
                kotlinOptions.useIR = true
            }
        }
    }

    kotlin.sourceSets.all {
        languageSettings {
            apiVersion = "1.4"
            languageVersion = "1.4"
        }
    }
}