mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
This should make it easier to upgrade libraries in the future and provide an overview over which versions we are using as well as keep them consistent throughout the project.
64 lines
1.5 KiB
Groovy
64 lines
1.5 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.3.0'
|
|
classpath files('libs/gradle-witness.jar')
|
|
}
|
|
}
|
|
|
|
|
|
ext {
|
|
// Define common library version centrally
|
|
daggerVersion = '2.0.2'
|
|
supportVersion = '27.0.1'
|
|
junitVersion = '4.12'
|
|
jmockVersion = '2.8.2'
|
|
hamcrestVersion = '1.3'
|
|
torVersion = '0.2.9.12'
|
|
geoipVersion = '2017-09-06'
|
|
|
|
// If a Java 6 JRE is available, check we're not using any Java 7 or 8 APIs
|
|
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 '**/*'
|
|
}
|