mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
23 lines
626 B
Groovy
23 lines
626 B
Groovy
|
import static org.gradle.api.JavaVersion.VERSION_1_8
|
||
|
|
||
|
/*
|
||
|
* Gradle script plugin: Configure a module such that Java and Kotlin
|
||
|
* are always compiled for Java 8.
|
||
|
*/
|
||
|
apply plugin: 'kotlin'
|
||
|
|
||
|
tasks.withType(AbstractCompile) {
|
||
|
// This is a bit ugly, but Gradle isn't recognising the KotlinCompile task
|
||
|
// as it does the built-in JavaCompile task.
|
||
|
if (it.class.name.startsWith('org.jetbrains.kotlin.gradle.tasks.KotlinCompile')) {
|
||
|
kotlinOptions {
|
||
|
jvmTarget = VERSION_1_8
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
tasks.withType(JavaCompile) {
|
||
|
sourceCompatibility = VERSION_1_8
|
||
|
targetCompatibility = VERSION_1_8
|
||
|
}
|