| /* |
| * Copyright 2017-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. |
| */ |
| |
| ext.configureKotlin = { |
| kotlin.sourceSets.configureEach { |
| languageSettings { |
| def overridingKotlinLanguageVersion = KotlinConfiguration.getOverridingKotlinLanguageVersion(project) |
| if (overridingKotlinLanguageVersion != null) { languageVersion = overridingKotlinLanguageVersion } |
| def overridingKotlinApiVersion = KotlinConfiguration.getOverridingKotlinApiVersion(project) |
| if (overridingKotlinApiVersion != null) { apiVersion = overridingKotlinApiVersion } |
| |
| optIn('kotlinx.cinterop.ExperimentalForeignApi') |
| } |
| } |
| } |