mirror of
https://github.com/corda/corda.git
synced 2025-02-21 01:42:24 +00:00
Target Java 6 for our Caplet, to ensure the corda.jar capsule-ified build can get as far as capsule's version checks if the users JVM is too old. Without this patch capsule tries to load the caplet and then dies because it targets a newer version of Java than what the user has, so the error message the user sees is useless (a bytecode version mismatch). With this patch the user sees a message like this:
"CAPSULE EXCEPTION: Could not find Java installation for requested version [Min. Java version: 1.8.0 JavaVersion: null Min. update version: {}] (JDK required: false). You can override the used Java version with the -Dcapsule.java.home flag. (for stack trace, run with -Dcapsule.log=verbose)" which isn't awesome either but at least tells the user what to do.
This commit is contained in:
parent
556b7f4469
commit
a9fc6f5495
@ -1,4 +1,5 @@
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'java'
|
||||
apply plugin: QuasarPlugin
|
||||
apply plugin: DefaultPublishTasks
|
||||
|
||||
@ -24,6 +25,14 @@ configurations {
|
||||
integrationTestRuntime.extendsFrom testRuntime
|
||||
}
|
||||
|
||||
// Force the Caplet to target Java 6. This ensures that running 'java -jar corda.jar' on any Java 6 VM upwards
|
||||
// will get as far as the Capsule version checks, meaning that if your JVM is too old, you will at least get
|
||||
// a sensible error message telling you what to do rather than a bytecode version exception that doesn't.
|
||||
// If we introduce .java files into this module that need Java 8+ then we will have to push the caplet into
|
||||
// its own module so its target can be controlled individually, but for now this suffices.
|
||||
sourceCompatibility = 1.6
|
||||
targetCompatibility = 1.6
|
||||
|
||||
sourceSets {
|
||||
integrationTest {
|
||||
kotlin {
|
||||
|
Loading…
x
Reference in New Issue
Block a user