mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 02:39:05 +01:00
52 lines
1.3 KiB
Groovy
52 lines
1.3 KiB
Groovy
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
allprojects {
|
|
repositories {
|
|
jcenter()
|
|
mavenLocal()
|
|
google()
|
|
}
|
|
}
|
|
|
|
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
mavenLocal()
|
|
google()
|
|
maven {
|
|
url 'https://plugins.gradle.org/m2/'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:3.0.1'
|
|
classpath 'net.ltgt.gradle:gradle-apt-plugin:0.9'
|
|
classpath 'de.undercouch:gradle-download-task:3.2.0'
|
|
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 '**/*'
|
|
}
|