mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Include java.lang.invoke classes in bootstrap classpath.
This commit is contained in:
@@ -38,10 +38,5 @@ artifacts {
|
||||
|
||||
// If a Java 6 JRE is available, check we're not using any Java 7 or 8 APIs
|
||||
tasks.withType(JavaCompile) {
|
||||
doFirst {
|
||||
def home = System.env.JAVA_6_HOME;
|
||||
if (home != null && !home.isEmpty()) {
|
||||
options.bootstrapClasspath = files("${home}/jre/lib/rt.jar", "${home}/jre/lib/jsse.jar")
|
||||
}
|
||||
}
|
||||
useJava6StandardLibrary(it)
|
||||
}
|
||||
|
||||
@@ -41,10 +41,5 @@ artifacts {
|
||||
|
||||
// If a Java 6 JRE is available, check we're not using any Java 7 or 8 APIs
|
||||
tasks.withType(JavaCompile) {
|
||||
doFirst {
|
||||
def home = System.env.JAVA_6_HOME;
|
||||
if (home != null && !home.isEmpty()) {
|
||||
options.bootstrapClasspath = files("${home}/jre/lib/rt.jar", "${home}/jre/lib/jsse.jar")
|
||||
}
|
||||
}
|
||||
useJava6StandardLibrary(it)
|
||||
}
|
||||
|
||||
@@ -8,10 +8,5 @@ dependencies {
|
||||
|
||||
// If a Java 6 JRE is available, check we're not using any Java 7 or 8 APIs
|
||||
tasks.withType(JavaCompile) {
|
||||
doFirst {
|
||||
def home = System.env.JAVA_6_HOME;
|
||||
if (home != null && !home.isEmpty()) {
|
||||
options.bootstrapClasspath = files("${home}/jre/lib/rt.jar", "${home}/jre/lib/jsse.jar")
|
||||
}
|
||||
}
|
||||
useJava6StandardLibrary(it)
|
||||
}
|
||||
|
||||
@@ -36,10 +36,5 @@ dependencyVerification {
|
||||
|
||||
// If a Java 6 JRE is available, check we're not using any Java 7 or 8 APIs
|
||||
tasks.withType(JavaCompile) {
|
||||
doFirst {
|
||||
def home = System.env.JAVA_6_HOME;
|
||||
if (home != null && !home.isEmpty()) {
|
||||
options.bootstrapClasspath = files("${home}/jre/lib/rt.jar", "${home}/jre/lib/jsse.jar")
|
||||
}
|
||||
}
|
||||
useJava6StandardLibrary(it)
|
||||
}
|
||||
|
||||
24
build.gradle
24
build.gradle
@@ -24,3 +24,27 @@ buildscript {
|
||||
classpath files('libs/gradle-witness.jar')
|
||||
}
|
||||
}
|
||||
|
||||
// If a Java 6 JRE is available, check we're not using any Java 7 or 8 APIs
|
||||
ext.useJava6StandardLibrary = { task ->
|
||||
def home = System.env.JAVA_6_HOME;
|
||||
if (home != null && !home.isEmpty()) {
|
||||
println "Setting Java 6 bootstrap classpath for ${task.name}"
|
||||
task.dependsOn createJavaLangInvokeJar
|
||||
task.options.bootstrapClasspath = files(
|
||||
"${project.rootDir}/build/invoke.jar",
|
||||
"${home}/jre/lib/rt.jar",
|
||||
"${home}/jre/lib/jsse.jar"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Create a jar containing the java.lang.invoke classes for the Java 6 bootstrap classpath
|
||||
task createJavaLangInvokeJar(type: Zip) {
|
||||
archiveName 'invoke.jar'
|
||||
destinationDir file("${project.rootDir}/build")
|
||||
from zipTree("${System.getProperty('java.home')}/lib/rt.jar").matching {
|
||||
include 'java/lang/invoke/*'
|
||||
}
|
||||
include '**/*'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user