corda/java8.gradle
Chris Rankin 39cc5e3403
CORDA-3698: Require no classifier for Open Core and DJVM-related modules. (#6132)
* ENT-4967: Require no classifier for corda-node-djvm, corda-deserializers-djvm.

* Also remove classifiers from core, serialization and finance-contracts.

* Compile corda-serialization-djvm for Java 8 and remove its classifier.
2020-04-06 11:00:40 +01:00

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
}