mirror of
https://github.com/corda/corda.git
synced 2024-12-24 07:06:44 +00:00
23 lines
654 B
Groovy
23 lines
654 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).configureEach {
|
|
// 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).configureEach {
|
|
sourceCompatibility = VERSION_1_8
|
|
targetCompatibility = VERSION_1_8
|
|
}
|