PassAndroid/android/build.gradle
2016-10-29 17:08:50 +02:00

215 lines
6.9 KiB
Groovy

buildscript {
ext {
support_version = '25.0.0'
dagger_version = '2.7'
kotlin_version = '1.0.4'
butterknife_version = '8.4.0'
play_version = '9.8.00'
}
repositories {
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'de.felixschulze.gradle:gradle-spoon-plugin:2.7.3'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'de.mobilej.unmock:UnMockPlugin:0.5.0'
// http://stackoverflow.com/a/33889117/322642
classpath 'com.github.JakeWharton:sdk-manager-plugin:220bf7a88a7072df3ed16dc8466fb144f2817070'
}
}
apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
apply plugin: 'de.felixschulze.gradle.spoon'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'de.mobilej.unmock'
apply plugin: 'com.github.ben-manes.versions'
repositories {
jcenter()
mavenLocal()
maven { url 'https://jitpack.io' }
}
android {
compileSdkVersion 25
buildToolsVersion "25"
defaultConfig {
versionCode 326
versionName "3.2.6"
minSdkVersion 9
targetSdkVersion 25
applicationId "org.ligi.passandroid"
testInstrumentationRunner "org.ligi.passandroid.AppReplacingRunner"
archivesBaseName = "PassAndroid-$versionName"
vectorDrawables.useSupportLibrary = true
}
flavorDimensions "maps", "analytics", "distribution"
productFlavors {
withMaps {
dimension "maps"
}
noMaps {
dimension "maps"
}
withAnalytics {
dimension "analytics"
}
noAnalytics {
dimension "analytics"
}
forFDroid {
dimension "distribution"
}
forPlay {
dimension "distribution"
}
}
packagingOptions {
// needed for assertJ
exclude 'asm-license.txt'
exclude 'LICENSE'
exclude 'NOTICE'
// hack for instrumentation testing :-(
exclude 'LICENSE.txt'
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
}
lintOptions {
warning 'MissingTranslation'
warning 'InvalidPackage'
// TODO: remove when this is solved: http://stackoverflow.com/questions/39714487/kapt2-and-butterknife-produce-lint-error-expected-resource-of-type-id
warning 'ResourceType'
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
}
dependencies {
kapt "com.google.dagger:dagger-compiler:$dagger_version"
kapt "com.jakewharton:butterknife-compiler:$butterknife_version"
provided 'org.glassfish:javax.annotation:10.0-b28'
kaptAndroidTest "com.google.dagger:dagger-compiler:$dagger_version"
androidTestCompile "com.android.support:support-annotations:$support_version"
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.2') {
// http://stackoverflow.com/questions/30578243/why-would-adding-espresso-contrib-cause-an-inflateexception
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'javax.inject'
exclude module: 'recyclerview-v7'
}
androidTestCompile('com.android.support.test.espresso:espresso-web:2.2.2') {
// http://stackoverflow.com/questions/30578243/why-would-adding-espresso-contrib-cause-an-inflateexception
exclude group: 'javax.inject'
}
androidTestCompile('com.android.support.test.espresso:espresso-intents:2.2.2') {
// http://stackoverflow.com/questions/30578243/why-would-adding-espresso-contrib-cause-an-inflateexception
exclude group: 'javax.inject'
}
androidTestCompile 'com.squareup.spoon:spoon-client:1.7.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'
androidTestCompile 'com.jraska:falcon-spoon-compat:1.0.3'
compile 'net.lingala.zip4j:zip4j:1.3.2'
compile "com.jakewharton:butterknife:$butterknife_version"
compile 'com.jakewharton.threetenabp:threetenabp:1.0.4'
compile 'org.greenrobot:eventbus:3.0.0'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-runtime:$kotlin_version"
compile "com.android.support:support-annotations:$support_version"
compile "com.android.support:recyclerview-v7:$support_version"
compile "com.android.support:appcompat-v7:$support_version"
compile "com.android.support:cardview-v7:$support_version"
compile "com.android.support:design:$support_version"
compile "com.android.support:preference-v7:$support_version"
androidTestCompile "com.android.support:appcompat-v7:$support_version"
androidTestCompile "com.android.support:design:$support_version"
compile 'net.i2p.android.ext:floatingactionbutton:1.10.1'
compile 'org.ligi:AXT:0.37'
compile 'org.ligi:tracedroid:1.4'
compile 'com.github.ligi:snackengage:0.9'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.larswerkman:HoloColorPicker:1.5'
compile 'com.google.code.findbugs:jsr305:3.0.1'
compile 'com.squareup.moshi:moshi:1.2.0'
compile 'com.chibatching:kotpref:1.4.0'
compile 'net.steamcrafted:load-toast:1.0.10'
compile "com.google.dagger:dagger:$dagger_version"
androidTestCompile 'com.google.code.findbugs:jsr305:3.0.1'
testCompile "com.android.support:support-annotations:$support_version"
testCompile 'com.squareup.assertj:assertj-android:1.1.1'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.9.5'
testCompile 'org.threeten:threetenbp:1.3.2'
// 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.3.0'
//compile fileTree(dir: 'libs', include: 'zxing-core-2.3.0-SNAPSHOT.jar')
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4'
withAnalyticsCompile "com.google.android.gms:play-services-analytics:$play_version"
withMapsCompile "com.google.android.gms:play-services-maps:$play_version"
compile 'com.github.hotchemi:permissionsdispatcher:2.2.0'
kapt 'com.github.hotchemi:permissionsdispatcher-processor:2.2.0'
}
spoon {
debug = true
}