Files
kotlin-fork/compiler/compiler.version/build.gradle.kts
T
Yahor Berdnikau 1bd0607b53 Fix toolchain jdk override was not working for all modules.
Now it also considers the case when separate tasks toolchain
are configured or module only has java toolchain.

^KT-46972 Fixed
2021-07-05 21:15:04 +02:00

30 lines
718 B
Kotlin

import org.apache.tools.ant.filters.ReplaceTokens
plugins {
java
id("jps-compatible")
}
// This module does not apply Kotlin plugin, so we are setting toolchain via
// java extension
configureJavaOnlyToolchain(JdkMajorVersion.JDK_1_6)
val kotlinVersion: String by rootProject.extra
dependencies {
compileOnly("org.jetbrains:annotations:13.0")
}
sourceSets {
"main" { projectDefault() }
"test" {}
}
tasks.named<ProcessResources>("processResources") {
val kotlinVersionLocal = kotlinVersion
inputs.property("compilerVersion", kotlinVersionLocal)
filesMatching("META-INF/compiler.version") {
filter<ReplaceTokens>("tokens" to mapOf("snapshot" to kotlinVersionLocal))
}
}