Compare commits

...

1 Commits

Author SHA1 Message Date
Torsten Grote
fa79a31911 Define common library version centrally in top-level build.gradle file
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.
2017-12-01 16:32:02 -02:00
7 changed files with 62 additions and 53 deletions

View File

@@ -27,7 +27,7 @@ dependencies {
implementation project(path: ':bramble-core', configuration: 'default') implementation project(path: ':bramble-core', configuration: 'default')
implementation fileTree(dir: 'libs', include: '*.jar') implementation fileTree(dir: 'libs', include: '*.jar')
annotationProcessor 'com.google.dagger:dagger-compiler:2.0.2' annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
compileOnly 'javax.annotation:jsr250-api:1.0' compileOnly 'javax.annotation:jsr250-api:1.0'
} }
@@ -55,8 +55,6 @@ dependencyVerification {
} }
ext.torBinaryDir = 'src/main/res/raw' ext.torBinaryDir = 'src/main/res/raw'
ext.torVersion = '0.2.9.12'
ext.geoipVersion = '2017-09-06'
ext.torDownloadUrl = 'https://briarproject.org/build/' ext.torDownloadUrl = 'https://briarproject.org/build/'
def torBinaries = [ def torBinaries = [

View File

@@ -5,15 +5,15 @@ targetCompatibility = 1.8
apply plugin: 'witness' apply plugin: 'witness'
dependencies { dependencies {
implementation "com.google.dagger:dagger:2.0.2" implementation "com.google.dagger:dagger:$daggerVersion"
implementation 'com.google.code.findbugs:jsr305:3.0.2' implementation 'com.google.code.findbugs:jsr305:3.0.2'
testImplementation 'junit:junit:4.12' testImplementation "junit:junit:$junitVersion"
testImplementation "org.jmock:jmock:2.8.2" testImplementation "org.jmock:jmock:$jmockVersion"
testImplementation "org.jmock:jmock-junit4:2.8.2" testImplementation "org.jmock:jmock-junit4:$jmockVersion"
testImplementation "org.jmock:jmock-legacy:2.8.2" testImplementation "org.jmock:jmock-legacy:$jmockVersion"
testImplementation "org.hamcrest:hamcrest-library:1.3" testImplementation "org.hamcrest:hamcrest-library:$hamcrestVersion"
testImplementation "org.hamcrest:hamcrest-core:1.3" testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion"
} }
dependencyVerification { dependencyVerification {

View File

@@ -13,17 +13,17 @@ dependencies {
implementation 'org.bitlet:weupnp:0.1.4' implementation 'org.bitlet:weupnp:0.1.4'
implementation 'net.i2p.crypto:eddsa:0.2.0' implementation 'net.i2p.crypto:eddsa:0.2.0'
apt 'com.google.dagger:dagger-compiler:2.0.2' apt "com.google.dagger:dagger-compiler:$daggerVersion"
testImplementation project(path: ':bramble-api', configuration: 'testOutput') testImplementation project(path: ':bramble-api', configuration: 'testOutput')
testImplementation 'junit:junit:4.12' testImplementation "junit:junit:$junitVersion"
testImplementation "org.jmock:jmock:2.8.2" testImplementation "org.jmock:jmock:$jmockVersion"
testImplementation "org.jmock:jmock-junit4:2.8.2" testImplementation "org.jmock:jmock-junit4:$jmockVersion"
testImplementation "org.jmock:jmock-legacy:2.8.2" testImplementation "org.jmock:jmock-legacy:$jmockVersion"
testImplementation "org.hamcrest:hamcrest-library:1.3" testImplementation "org.hamcrest:hamcrest-library:$hamcrestVersion"
testImplementation "org.hamcrest:hamcrest-core:1.3" testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion"
testApt 'com.google.dagger:dagger-compiler:2.0.2' testApt "com.google.dagger:dagger-compiler:$daggerVersion"
} }
dependencyVerification { dependencyVerification {

View File

@@ -12,16 +12,16 @@ dependencies {
implementation 'net.java.dev.jna:jna:4.4.0' implementation 'net.java.dev.jna:jna:4.4.0'
implementation 'net.java.dev.jna:jna-platform:4.4.0' implementation 'net.java.dev.jna:jna-platform:4.4.0'
apt 'com.google.dagger:dagger-compiler:2.0.2' apt "com.google.dagger:dagger-compiler:$daggerVersion"
testImplementation project(path: ':bramble-api', configuration: 'testOutput') testImplementation project(path: ':bramble-api', configuration: 'testOutput')
testImplementation project(path: ':bramble-core', configuration: 'testOutput') testImplementation project(path: ':bramble-core', configuration: 'testOutput')
testImplementation 'junit:junit:4.12' testImplementation "junit:junit:$junitVersion"
testImplementation "org.jmock:jmock:2.8.2" testImplementation "org.jmock:jmock:$jmockVersion"
testImplementation "org.jmock:jmock-junit4:2.8.2" testImplementation "org.jmock:jmock-junit4:$jmockVersion"
testImplementation "org.jmock:jmock-legacy:2.8.2" testImplementation "org.jmock:jmock-legacy:$jmockVersion"
testImplementation "org.hamcrest:hamcrest-library:1.3" testImplementation "org.hamcrest:hamcrest-library:$hamcrestVersion"
testImplementation "org.hamcrest:hamcrest-core:1.3" testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion"
} }
dependencyVerification { dependencyVerification {

View File

@@ -6,7 +6,6 @@ dependencies {
implementation project(path: ':bramble-core', configuration: 'default') implementation project(path: ':bramble-core', configuration: 'default')
implementation project(path: ':bramble-android', configuration: 'default') implementation project(path: ':bramble-android', configuration: 'default')
def supportVersion = '27.0.1'
implementation "com.android.support:support-v4:$supportVersion" implementation "com.android.support:support-v4:$supportVersion"
implementation("com.android.support:appcompat-v7:$supportVersion") { implementation("com.android.support:appcompat-v7:$supportVersion") {
exclude module: 'support-v4' exclude module: 'support-v4'
@@ -34,7 +33,7 @@ dependencies {
implementation 'com.github.bumptech.glide:glide:3.8.0' implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'uk.co.samuelwall:material-tap-target-prompt:2.1.0' implementation 'uk.co.samuelwall:material-tap-target-prompt:2.1.0'
annotationProcessor 'com.google.dagger:dagger-compiler:2.0.2' annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
compileOnly 'javax.annotation:jsr250-api:1.0' compileOnly 'javax.annotation:jsr250-api:1.0'
@@ -43,12 +42,12 @@ dependencies {
testImplementation 'org.robolectric:robolectric:3.5.1' testImplementation 'org.robolectric:robolectric:3.5.1'
testImplementation 'org.robolectric:shadows-support-v4:3.0' testImplementation 'org.robolectric:shadows-support-v4:3.0'
testImplementation 'org.mockito:mockito-core:2.8.9' testImplementation 'org.mockito:mockito-core:2.8.9'
testImplementation 'junit:junit:4.12' testImplementation "junit:junit:$junitVersion"
testImplementation "org.jmock:jmock:2.8.2" testImplementation "org.jmock:jmock:$jmockVersion"
testImplementation "org.jmock:jmock-junit4:2.8.2" testImplementation "org.jmock:jmock-junit4:$jmockVersion"
testImplementation "org.jmock:jmock-legacy:2.8.2" testImplementation "org.jmock:jmock-legacy:$jmockVersion"
testImplementation "org.hamcrest:hamcrest-library:1.3" testImplementation "org.hamcrest:hamcrest-library:$hamcrestVersion"
testImplementation "org.hamcrest:hamcrest-core:1.3" testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion"
} }
dependencyVerification { dependencyVerification {

View File

@@ -13,20 +13,20 @@ dependencies {
implementation 'com.squareup.okhttp3:okhttp:3.8.0' implementation 'com.squareup.okhttp3:okhttp:3.8.0'
implementation 'org.jsoup:jsoup:1.10.3' implementation 'org.jsoup:jsoup:1.10.3'
apt 'com.google.dagger:dagger-compiler:2.0.2' apt "com.google.dagger:dagger-compiler:$daggerVersion"
testImplementation project(path: ':bramble-core', configuration: 'default') testImplementation project(path: ':bramble-core', configuration: 'default')
testImplementation project(path: ':bramble-core', configuration: 'testOutput') testImplementation project(path: ':bramble-core', configuration: 'testOutput')
testImplementation project(path: ':bramble-api', configuration: 'testOutput') testImplementation project(path: ':bramble-api', configuration: 'testOutput')
testImplementation 'net.jodah:concurrentunit:0.4.2' testImplementation 'net.jodah:concurrentunit:0.4.2'
testImplementation 'junit:junit:4.12' testImplementation "junit:junit:$junitVersion"
testImplementation "org.jmock:jmock:2.8.2" testImplementation "org.jmock:jmock:$jmockVersion"
testImplementation "org.jmock:jmock-junit4:2.8.2" testImplementation "org.jmock:jmock-junit4:$jmockVersion"
testImplementation "org.jmock:jmock-legacy:2.8.2" testImplementation "org.jmock:jmock-legacy:$jmockVersion"
testImplementation "org.hamcrest:hamcrest-library:1.3" testImplementation "org.hamcrest:hamcrest-library:$hamcrestVersion"
testImplementation "org.hamcrest:hamcrest-core:1.3" testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion"
testApt 'com.google.dagger:dagger-compiler:2.0.2' testApt "com.google.dagger:dagger-compiler:$daggerVersion"
} }
dependencyVerification { dependencyVerification {

View File

@@ -21,13 +21,24 @@ buildscript {
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.0.1' classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'net.ltgt.gradle:gradle-apt-plugin:0.9' classpath 'net.ltgt.gradle:gradle-apt-plugin:0.9'
classpath 'de.undercouch:gradle-download-task:3.2.0' classpath 'de.undercouch:gradle-download-task:3.3.0'
classpath files('libs/gradle-witness.jar') 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 // If a Java 6 JRE is available, check we're not using any Java 7 or 8 APIs
ext.useJava6StandardLibrary = { task -> useJava6StandardLibrary = { task ->
def home = System.env.JAVA_6_HOME; def home = System.env.JAVA_6_HOME;
if (home != null && !home.isEmpty()) { if (home != null && !home.isEmpty()) {
println "Setting Java 6 bootstrap classpath for ${task.name}" println "Setting Java 6 bootstrap classpath for ${task.name}"
@@ -39,6 +50,7 @@ ext.useJava6StandardLibrary = { task ->
) )
} }
} }
}
// Create a jar containing the java.lang.invoke classes for the Java 6 bootstrap classpath // Create a jar containing the java.lang.invoke classes for the Java 6 bootstrap classpath
task createJavaLangInvokeJar(type: Zip) { task createJavaLangInvokeJar(type: Zip) {