2014-08-18 18:43:13 +00:00
|
|
|
apply plugin: 'com.android.application'
|
2016-10-28 15:49:00 +00:00
|
|
|
apply plugin: 'spoon'
|
2015-12-20 18:11:06 +00:00
|
|
|
apply plugin: 'kotlin-android'
|
2016-10-23 15:07:32 +00:00
|
|
|
apply plugin: 'kotlin-android-extensions'
|
2016-09-19 21:22:28 +00:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2015-10-17 21:03:26 +00:00
|
|
|
apply plugin: 'de.mobilej.unmock'
|
2015-11-15 19:28:36 +00:00
|
|
|
apply plugin: 'com.github.ben-manes.versions'
|
2016-12-02 21:25:43 +00:00
|
|
|
apply plugin: 'com.github.triplet.play'
|
2013-08-01 18:50:41 +00:00
|
|
|
|
|
|
|
repositories {
|
2014-08-12 18:56:31 +00:00
|
|
|
jcenter()
|
2015-03-03 02:28:35 +00:00
|
|
|
mavenLocal()
|
2016-09-28 13:33:25 +00:00
|
|
|
maven { url 'https://jitpack.io' }
|
2013-08-01 18:50:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2015-01-25 23:07:50 +00:00
|
|
|
|
2016-10-21 01:20:52 +00:00
|
|
|
compileSdkVersion 25
|
2016-12-14 17:26:57 +00:00
|
|
|
buildToolsVersion "25.0.2"
|
2015-01-25 23:07:50 +00:00
|
|
|
|
|
|
|
defaultConfig {
|
2017-04-13 17:13:56 +00:00
|
|
|
versionCode 340
|
|
|
|
versionName "3.4.0"
|
2016-07-27 09:18:55 +00:00
|
|
|
minSdkVersion 9
|
2016-10-21 01:20:52 +00:00
|
|
|
targetSdkVersion 25
|
2015-01-25 23:07:50 +00:00
|
|
|
applicationId "org.ligi.passandroid"
|
2016-10-24 17:13:03 +00:00
|
|
|
testInstrumentationRunner "org.ligi.passandroid.AppReplacingRunner"
|
2015-07-02 13:05:00 +00:00
|
|
|
archivesBaseName = "PassAndroid-$versionName"
|
2016-03-07 18:21:12 +00:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
2015-01-25 23:07:50 +00:00
|
|
|
}
|
|
|
|
|
2014-04-27 03:51:18 +00:00
|
|
|
flavorDimensions "maps", "analytics", "distribution"
|
2014-01-15 23:42:39 +00:00
|
|
|
|
2013-08-19 12:24:41 +00:00
|
|
|
productFlavors {
|
2013-08-23 01:39:42 +00:00
|
|
|
|
2013-08-19 12:24:41 +00:00
|
|
|
withMaps {
|
2015-05-09 16:49:50 +00:00
|
|
|
dimension "maps"
|
2013-08-19 12:24:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
noMaps {
|
2015-05-09 16:49:50 +00:00
|
|
|
dimension "maps"
|
2013-08-19 12:24:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
withAnalytics {
|
2015-05-09 16:49:50 +00:00
|
|
|
dimension "analytics"
|
2013-08-19 12:24:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
noAnalytics {
|
2015-05-09 16:49:50 +00:00
|
|
|
dimension "analytics"
|
2013-08-19 12:24:41 +00:00
|
|
|
}
|
|
|
|
|
2014-01-16 00:34:32 +00:00
|
|
|
forFDroid {
|
2015-05-09 16:49:50 +00:00
|
|
|
dimension "distribution"
|
2014-01-16 00:34:32 +00:00
|
|
|
}
|
2014-01-15 23:42:39 +00:00
|
|
|
|
2014-01-16 00:34:32 +00:00
|
|
|
forPlay {
|
2015-05-09 16:49:50 +00:00
|
|
|
dimension "distribution"
|
2014-01-16 00:34:32 +00:00
|
|
|
}
|
2017-03-23 12:03:42 +00:00
|
|
|
forAmazon {
|
|
|
|
dimension "distribution"
|
|
|
|
}
|
|
|
|
|
2013-08-19 12:24:41 +00:00
|
|
|
}
|
2017-03-25 02:35:39 +00:00
|
|
|
android.variantFilter { variant ->
|
|
|
|
def maps = variant.getFlavors().get(0).name
|
|
|
|
def analytics = variant.getFlavors().get(1).name
|
|
|
|
def distribution = variant.getFlavors().get(2).name
|
|
|
|
|
2017-04-07 17:44:57 +00:00
|
|
|
variant.setIgnore((project.hasProperty("singleFlavor") && (distribution != 'forPlay'))
|
|
|
|
|| ((distribution == 'forAmazon' || distribution == 'forPlay') && analytics == 'noAnalytics')
|
2017-03-25 02:35:39 +00:00
|
|
|
|| ((distribution == 'forAmazon' || distribution == 'forPlay') && maps == 'noMaps')
|
|
|
|
|| (distribution == 'forFDroid' && analytics == 'withAnalytics')
|
2017-04-07 17:44:57 +00:00
|
|
|
|| (distribution == 'forFDroid' && maps == 'withMaps'))
|
2017-03-25 02:35:39 +00:00
|
|
|
}
|
2013-08-19 12:24:41 +00:00
|
|
|
|
2014-09-04 22:24:50 +00:00
|
|
|
packagingOptions {
|
2015-01-03 21:38:42 +00:00
|
|
|
// needed for assertJ
|
|
|
|
exclude 'asm-license.txt'
|
|
|
|
exclude 'LICENSE'
|
|
|
|
exclude 'NOTICE'
|
|
|
|
|
|
|
|
// hack for instrumentation testing :-(
|
|
|
|
exclude 'LICENSE.txt'
|
2015-12-21 01:21:42 +00:00
|
|
|
|
|
|
|
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
|
|
|
|
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
|
|
|
|
|
2014-09-04 22:24:50 +00:00
|
|
|
}
|
|
|
|
|
2015-02-14 17:09:52 +00:00
|
|
|
lintOptions {
|
2015-10-04 19:07:35 +00:00
|
|
|
warning 'MissingTranslation'
|
|
|
|
warning 'InvalidPackage'
|
2015-02-14 17:09:52 +00:00
|
|
|
}
|
2016-01-25 23:19:15 +00:00
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled true
|
|
|
|
shrinkResources true
|
2016-02-18 21:18:16 +00:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
|
2016-01-25 23:19:15 +00:00
|
|
|
}
|
|
|
|
}
|
2016-03-01 07:35:08 +00:00
|
|
|
}
|
|
|
|
|
2017-04-10 13:24:59 +00:00
|
|
|
configurations {
|
|
|
|
|
|
|
|
// http://stackoverflow.com/questions/30578243/why-would-adding-espresso-contrib-cause-an-inflateexception
|
|
|
|
androidTestCompile.exclude group: 'com.android.support', module: 'appcompat-v7'
|
|
|
|
androidTestCompile.exclude group: 'com.android.support', module: 'design'
|
|
|
|
androidTestCompile.exclude group: 'com.android.support', module: 'support-v4'
|
|
|
|
androidTestCompile.exclude group: 'com.android.support', module: 'support-annotations'
|
|
|
|
androidTestCompile.exclude group: 'com.android.support', module: 'preference-v7'
|
|
|
|
androidTestCompile.exclude module: 'recyclerview-v7'
|
|
|
|
androidTestCompile.exclude module: 'kotlin-stdlib'
|
|
|
|
}
|
|
|
|
|
2013-11-25 22:19:53 +00:00
|
|
|
dependencies {
|
2017-03-19 12:30:37 +00:00
|
|
|
compile 'com.github.hotchemi:permissionsdispatcher:2.3.2'
|
|
|
|
kapt 'com.github.hotchemi:permissionsdispatcher-processor:2.3.2'
|
2016-10-30 21:47:58 +00:00
|
|
|
|
2017-04-11 21:27:56 +00:00
|
|
|
compile 'com.github.salomonbrys.kodein:kodein:3.3.0'
|
2015-11-11 22:55:06 +00:00
|
|
|
|
2017-04-11 21:27:56 +00:00
|
|
|
provided 'org.glassfish:javax.annotation:10.0-b28'
|
2015-05-09 16:05:41 +00:00
|
|
|
|
2017-04-10 13:24:59 +00:00
|
|
|
androidTestCompile 'com.github.ligi:trulesk:0.19'
|
2016-11-23 20:43:50 +00:00
|
|
|
|
2017-04-10 13:24:59 +00:00
|
|
|
androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.2.2'
|
2015-11-15 20:33:29 +00:00
|
|
|
|
2015-10-23 17:32:05 +00:00
|
|
|
androidTestCompile 'com.squareup.assertj:assertj-android:1.1.1'
|
2014-08-18 18:40:51 +00:00
|
|
|
|
2017-02-19 15:55:01 +00:00
|
|
|
androidTestCompile "org.mockito:mockito-core:$mockito_version"
|
|
|
|
androidTestCompile 'com.linkedin.dexmaker:dexmaker-mockito:2.2.0'
|
2014-08-18 18:40:51 +00:00
|
|
|
|
2017-04-04 01:09:15 +00:00
|
|
|
androidTestCompile 'com.google.code.findbugs:jsr305:3.0.2'
|
2017-04-07 17:44:57 +00:00
|
|
|
|
2016-10-30 21:47:58 +00:00
|
|
|
androidTestCompile "com.android.support:appcompat-v7:$support_version"
|
|
|
|
androidTestCompile "com.android.support:design:$support_version"
|
|
|
|
|
2016-10-27 20:12:31 +00:00
|
|
|
compile 'com.github.ligi:TouchImageView:2.1'
|
2016-10-27 20:38:26 +00:00
|
|
|
compile 'com.github.ligi:ExtraCompats:0.4'
|
|
|
|
|
2014-04-25 16:30:44 +00:00
|
|
|
compile 'net.lingala.zip4j:zip4j:1.3.2'
|
2017-02-05 21:31:39 +00:00
|
|
|
compile 'com.jakewharton.threetenabp:threetenabp:1.0.5'
|
2016-04-04 01:48:26 +00:00
|
|
|
compile 'org.greenrobot:eventbus:3.0.0'
|
2014-11-13 19:44:24 +00:00
|
|
|
|
2015-12-20 18:11:06 +00:00
|
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
2014-03-28 22:25:59 +00:00
|
|
|
|
2015-12-20 18:11:06 +00:00
|
|
|
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"
|
|
|
|
|
2016-02-19 06:31:27 +00:00
|
|
|
compile 'net.i2p.android.ext:floatingactionbutton:1.10.1'
|
2015-03-13 14:34:45 +00:00
|
|
|
|
2017-04-09 17:17:45 +00:00
|
|
|
compile 'com.github.ligi:KAXT:0.17'
|
2016-11-23 20:43:50 +00:00
|
|
|
compile 'com.github.ligi:loadtoast:1.10.11'
|
|
|
|
compile 'com.github.ligi:tracedroid:1.4'
|
|
|
|
|
2017-04-13 02:37:52 +00:00
|
|
|
forPlayCompile 'com.github.ligi.snackengage:snackengage-playrate:0.12'
|
|
|
|
forFDroidCompile 'com.github.ligi.snackengage:snackengage-playrate:0.12'
|
|
|
|
forAmazonCompile 'com.github.ligi.snackengage:snackengage-amazonrate:0.12'
|
2017-04-07 17:44:57 +00:00
|
|
|
|
2017-05-11 08:57:15 +00:00
|
|
|
compile 'com.squareup.okhttp3:okhttp:3.7.0'
|
2015-11-16 21:36:49 +00:00
|
|
|
compile 'com.larswerkman:HoloColorPicker:1.5'
|
2017-04-04 01:09:15 +00:00
|
|
|
compile 'com.google.code.findbugs:jsr305:3.0.2'
|
2017-03-21 22:31:56 +00:00
|
|
|
compile 'com.squareup.moshi:moshi:1.4.0'
|
2017-02-27 19:06:03 +00:00
|
|
|
|
2017-03-26 21:44:37 +00:00
|
|
|
compile "com.chibatching.kotpref:kotpref:2.1.1"
|
|
|
|
compile "com.chibatching.kotpref:initializer:2.1.1"
|
2015-04-01 11:13:46 +00:00
|
|
|
|
2016-05-11 21:32:34 +00:00
|
|
|
testCompile "com.android.support:support-annotations:$support_version"
|
2015-10-23 17:32:05 +00:00
|
|
|
testCompile 'com.squareup.assertj:assertj-android:1.1.1'
|
2015-08-11 12:36:10 +00:00
|
|
|
testCompile 'junit:junit:4.12'
|
2017-02-19 15:55:01 +00:00
|
|
|
testCompile "org.mockito:mockito-core:${mockito_version}"
|
2016-12-21 21:31:02 +00:00
|
|
|
testCompile 'org.threeten:threetenbp:1.3.3'
|
2015-08-11 12:36:10 +00:00
|
|
|
|
2014-06-05 12:30:08 +00:00
|
|
|
// 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
|
2016-10-24 17:13:03 +00:00
|
|
|
compile 'com.google.zxing:core:3.3.0'
|
2014-06-05 12:30:08 +00:00
|
|
|
|
2016-09-12 09:15:18 +00:00
|
|
|
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4'
|
|
|
|
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4'
|
2015-06-15 21:50:58 +00:00
|
|
|
|
2016-06-13 12:48:50 +00:00
|
|
|
withAnalyticsCompile "com.google.android.gms:play-services-analytics:$play_version"
|
|
|
|
withMapsCompile "com.google.android.gms:play-services-maps:$play_version"
|
2013-11-25 22:19:53 +00:00
|
|
|
}
|
2015-09-08 22:04:58 +00:00
|
|
|
|
|
|
|
spoon {
|
|
|
|
debug = true
|
2016-10-28 15:49:00 +00:00
|
|
|
grantAllPermissions = true
|
2017-04-09 15:25:15 +00:00
|
|
|
// TODO - http://stackoverflow.com/questions/43308368/app-had-used-a-different-appcomponent-during-pre-verification
|
2015-09-08 22:04:58 +00:00
|
|
|
}
|
|
|
|
|
2016-12-02 21:25:43 +00:00
|
|
|
play {
|
|
|
|
jsonFile = file('/media/ligi/USBCRED/play.json')
|
|
|
|
uploadImages = true
|
|
|
|
}
|