188 lines
5.6 KiB
Groovy
188 lines
5.6 KiB
Groovy
buildscript {
|
|
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:1.3.1'
|
|
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
|
|
classpath('com.squareup.spoon:spoon-runner:1.2.0') {
|
|
exclude module: "guava"
|
|
}
|
|
classpath('com.stanfy.spoon:spoon-gradle-plugin:1.0.3') {
|
|
exclude module: "guava"
|
|
}
|
|
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
|
|
classpath 'de.mobilej.unmock:UnMockPlugin:0.3.5'
|
|
|
|
}
|
|
}
|
|
|
|
apply plugin: 'android-sdk-manager'
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'spoon'
|
|
apply plugin: 'com.neenbedankt.android-apt'
|
|
apply plugin: 'de.mobilej.unmock'
|
|
|
|
repositories {
|
|
jcenter()
|
|
mavenLocal()
|
|
}
|
|
|
|
android {
|
|
|
|
compileSdkVersion 23
|
|
buildToolsVersion "23.0.2"
|
|
|
|
defaultConfig {
|
|
versionCode 259
|
|
versionName "2.5.9"
|
|
minSdkVersion 9
|
|
targetSdkVersion 23
|
|
applicationId "org.ligi.passandroid"
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
archivesBaseName = "PassAndroid-$versionName"
|
|
}
|
|
|
|
flavorDimensions "maps", "analytics", "distribution"
|
|
|
|
productFlavors {
|
|
|
|
withMaps {
|
|
dimension "maps"
|
|
}
|
|
|
|
noMaps {
|
|
dimension "maps"
|
|
}
|
|
|
|
withAnalytics {
|
|
dimension "analytics"
|
|
}
|
|
|
|
noAnalytics {
|
|
dimension "analytics"
|
|
}
|
|
|
|
forFDroid {
|
|
dimension "distribution"
|
|
}
|
|
|
|
forPlay {
|
|
dimension "distribution"
|
|
}
|
|
}
|
|
|
|
// needed for assertJ
|
|
packagingOptions {
|
|
// needed for assertJ
|
|
exclude 'asm-license.txt'
|
|
exclude 'LICENSE'
|
|
exclude 'NOTICE'
|
|
|
|
// hack for instrumentation testing :-(
|
|
exclude 'LICENSE.txt'
|
|
}
|
|
|
|
lintOptions {
|
|
warning 'MissingTranslation'
|
|
warning 'InvalidPackage'
|
|
}
|
|
}
|
|
|
|
|
|
configurations {
|
|
// http://qathread.blogspot.de/2015/02/discovering-espresso-for-android.html
|
|
androidTestCompile.exclude group: 'com.android.support', module: 'support-v4'
|
|
}
|
|
final DAGGER_VERSION = '2.0.2'
|
|
|
|
dependencies {
|
|
apt 'org.projectlombok:lombok:1.16.6'
|
|
apt "com.google.dagger:dagger-compiler:${DAGGER_VERSION}"
|
|
|
|
provided "org.projectlombok:lombok:1.16.6"
|
|
|
|
provided 'org.glassfish:javax.annotation:10.0-b28'
|
|
|
|
|
|
androidTestApt "com.google.dagger:dagger-compiler:${DAGGER_VERSION}"
|
|
androidTestCompile 'com.android.support:appcompat-v7:23.1.1'
|
|
androidTestCompile 'com.android.support:support-v4:23.1.1'
|
|
androidTestCompile 'com.android.support:support-annotations:23.1.1'
|
|
|
|
androidTestCompile 'com.android.support.test:runner:0.4.1'
|
|
androidTestCompile 'com.android.support.test:rules:0.4.1'
|
|
androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1'){
|
|
// http://stackoverflow.com/questions/30578243/why-would-adding-espresso-contrib-cause-an-inflateexception
|
|
exclude group: 'com.android.support', module: 'appcompat-v7'
|
|
exclude group: 'com.android.support', module: 'support-v4'
|
|
exclude module: 'recyclerview-v7'
|
|
}
|
|
|
|
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.1') {
|
|
// http://stackoverflow.com/questions/30578243/why-would-adding-espresso-contrib-cause-an-inflateexception
|
|
exclude group: 'com.android.support', module: 'appcompat-v7'
|
|
exclude group: 'com.android.support', module: 'support-v4'
|
|
exclude module: 'recyclerview-v7'
|
|
}
|
|
|
|
androidTestCompile 'com.squareup.spoon:spoon-client:1.2.0'
|
|
androidTestCompile 'com.squareup.assertj:assertj-android:1.1.1'
|
|
|
|
androidTestCompile 'org.mockito:mockito-core:1.9.5'
|
|
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
|
|
|
|
// The Apache Softwjsrare License, Version 2.0
|
|
compile 'com.google.code.gson:gson:2.4'
|
|
compile 'net.lingala.zip4j:zip4j:1.3.2'
|
|
compile 'com.jakewharton:butterknife:7.0.1'
|
|
compile 'net.danlew:android.joda:2.9.0'
|
|
compile 'com.squareup:otto:1.3.8'
|
|
|
|
compile 'com.android.support:support-annotations:23.1.1'
|
|
compile 'com.android.support:support-v4:23.1.1'
|
|
compile 'com.android.support:recyclerview-v7:23.1.1'
|
|
compile 'com.android.support:appcompat-v7:23.1.1'
|
|
compile 'com.android.support:cardview-v7:23.1.1'
|
|
|
|
compile 'net.i2p.android.ext:floatingactionbutton:1.10.0'
|
|
|
|
compile 'org.ligi:AXT:0.33'
|
|
compile 'org.ligi:tracedroid:1.4'
|
|
compile 'org.ligi:snackengage:0.4'
|
|
compile 'com.squareup.okhttp:okhttp:2.5.0'
|
|
compile 'com.larswerkman:HoloColorPicker:1.4'
|
|
compile 'com.google.code.findbugs:jsr305:3.0.1'
|
|
|
|
compile 'net.steamcrafted:load-toast:1.0.9'
|
|
|
|
compile "com.google.dagger:dagger:${DAGGER_VERSION}"
|
|
|
|
|
|
androidTestCompile 'com.google.code.findbugs:jsr305:3.0.1'
|
|
|
|
testCompile 'com.squareup.assertj:assertj-android:1.1.1'
|
|
testCompile 'com.android.support:support-annotations:23.1.1'
|
|
testCompile 'junit:junit:4.12'
|
|
testCompile 'org.mockito:mockito-core:1.9.5'
|
|
|
|
// cannot use this new version: https://github.com/zxing/zxing/issues/165
|
|
// WARNING: might work on some devices or the emulator - but fails on others
|
|
// compile 'com.google.zxing:core:3.1.0'
|
|
|
|
compile fileTree(dir: 'libs', include: 'zxing-core-2.3.0-SNAPSHOT.jar')
|
|
|
|
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
|
|
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
|
|
|
|
withAnalyticsCompile 'com.google.android.gms:play-services-analytics:7.8.0'
|
|
withMapsCompile 'com.google.android.gms:play-services-maps:7.8.0'
|
|
}
|
|
|
|
spoon {
|
|
debug = true
|
|
}
|
|
|
|
|