mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
CORDA-2876: Ensure that sandboxable byte-code is compiled for Java 8.
This commit is contained in:
parent
4a8c73bf4a
commit
b1c164e26d
@ -1,3 +1,5 @@
|
|||||||
|
import static org.gradle.api.JavaVersion.VERSION_1_8
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Gradle script plugin: Configure a module such that the Java and Kotlin
|
* Gradle script plugin: Configure a module such that the Java and Kotlin
|
||||||
* compilers use the deterministic rt.jar instead of the full JDK rt.jar.
|
* compilers use the deterministic rt.jar instead of the full JDK rt.jar.
|
||||||
@ -19,11 +21,16 @@ tasks.withType(AbstractCompile) {
|
|||||||
|
|
||||||
// This is a bit ugly, but Gradle isn't recognising the KotlinCompile task
|
// This is a bit ugly, but Gradle isn't recognising the KotlinCompile task
|
||||||
// as it does the built-in JavaCompile task.
|
// as it does the built-in JavaCompile task.
|
||||||
if (it.class.name.startsWith("org.jetbrains.kotlin.gradle.tasks.KotlinCompile")) {
|
if (it.class.name.startsWith('org.jetbrains.kotlin.gradle.tasks.KotlinCompile')) {
|
||||||
kotlinOptions.jdkHome = deterministic_jdk_home
|
kotlinOptions {
|
||||||
|
jdkHome = deterministic_jdk_home
|
||||||
|
jvmTarget = VERSION_1_8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
options.compilerArgs << '-bootclasspath' << deterministic_rt_jar
|
options.compilerArgs << '-bootclasspath' << deterministic_rt_jar
|
||||||
|
sourceCompatibility = VERSION_1_8
|
||||||
|
targetCompatibility = VERSION_1_8
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import static org.gradle.api.JavaVersion.VERSION_1_8
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'org.jetbrains.kotlin.jvm'
|
id 'org.jetbrains.kotlin.jvm'
|
||||||
id 'net.corda.plugins.publish-utils'
|
id 'net.corda.plugins.publish-utils'
|
||||||
@ -42,6 +44,18 @@ dependencies {
|
|||||||
sandboxTesting "org.slf4j:slf4j-nop:$slf4j_version"
|
sandboxTesting "org.slf4j:slf4j-nop:$slf4j_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The DJVM only supports Java 8 byte-code.
|
||||||
|
compileTestJava {
|
||||||
|
sourceCompatibility = VERSION_1_8
|
||||||
|
targetCompatibility = VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
compileTestKotlin {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = VERSION_1_8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
archiveBaseName = 'corda-serialization-djvm'
|
archiveBaseName = 'corda-serialization-djvm'
|
||||||
manifest {
|
manifest {
|
||||||
|
Loading…
Reference in New Issue
Block a user