mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Support Java 8 language features in Java modules.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
apply plugin: 'java'
|
||||
sourceCompatibility = 1.6
|
||||
targetCompatibility = 1.6
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
apply plugin: 'witness'
|
||||
|
||||
@@ -35,3 +35,13 @@ task jarTest(type: Jar, dependsOn: testClasses) {
|
||||
artifacts {
|
||||
testOutput jarTest
|
||||
}
|
||||
|
||||
// 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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user