mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 13:19:52 +01:00
Support Java 8 language features in Java modules.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
sourceCompatibility = 1.6
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.6
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
apply plugin: 'witness'
|
apply plugin: 'witness'
|
||||||
|
|
||||||
@@ -35,3 +35,13 @@ task jarTest(type: Jar, dependsOn: testClasses) {
|
|||||||
artifacts {
|
artifacts {
|
||||||
testOutput jarTest
|
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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
sourceCompatibility = 1.6
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.6
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
apply plugin: 'net.ltgt.apt'
|
apply plugin: 'net.ltgt.apt'
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
@@ -38,3 +38,13 @@ task jarTest(type: Jar, dependsOn: testClasses) {
|
|||||||
artifacts {
|
artifacts {
|
||||||
testOutput jarTest
|
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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
sourceCompatibility = 1.7
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.7
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
apply plugin: 'net.ltgt.apt'
|
apply plugin: 'net.ltgt.apt'
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
|
|||||||
@@ -1,7 +1,17 @@
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
sourceCompatibility = 1.6
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.6
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(path: ':bramble-api', configuration: 'default')
|
compile project(path: ':bramble-api', configuration: 'default')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
sourceCompatibility = 1.6
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.6
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
apply plugin: 'net.ltgt.apt'
|
apply plugin: 'net.ltgt.apt'
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
@@ -33,3 +33,13 @@ dependencyVerification {
|
|||||||
'com.squareup.okio:okio:734269c3ebc5090e3b23566db558f421f0b4027277c79ad5d176b8ec168bb850',
|
'com.squareup.okio:okio:734269c3ebc5090e3b23566db558f421f0b4027277c79ad5d176b8ec168bb850',
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
include ':bramble-api', ':bramble-android'
|
include ':bramble-api'
|
||||||
include ':bramble-core'
|
include ':bramble-core'
|
||||||
|
include ':bramble-android'
|
||||||
include ':bramble-j2se'
|
include ':bramble-j2se'
|
||||||
include ':briar-api'
|
include ':briar-api'
|
||||||
include ':briar-core'
|
include ':briar-core'
|
||||||
|
|||||||
Reference in New Issue
Block a user