2014-08-18 18:43:13 +00:00
|
|
|
apply plugin: 'com.android.application'
|
2019-10-29 16:40:08 +00:00
|
|
|
apply plugin: 'com.trevjonez.composer'
|
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'
|
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()
|
2019-05-06 07:01:33 +00:00
|
|
|
google()
|
2019-09-17 12:40:34 +00:00
|
|
|
maven { url 'https://www.jitpack.io' }
|
2013-08-01 18:50:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2015-01-25 23:07:50 +00:00
|
|
|
|
2019-10-30 01:52:16 +00:00
|
|
|
compileSdkVersion 29
|
2015-01-25 23:07:50 +00:00
|
|
|
|
|
|
|
defaultConfig {
|
2019-10-30 05:12:38 +00:00
|
|
|
versionCode 351
|
|
|
|
versionName "3.5.1"
|
2019-05-06 07:01:33 +00:00
|
|
|
minSdkVersion 14
|
2019-10-30 01:52:16 +00:00
|
|
|
targetSdkVersion 29
|
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
|
|
|
}
|
2019-05-06 07:01:33 +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
|
|
|
}
|
|
|
|
}
|
2019-05-06 07:01:33 +00:00
|
|
|
compileOptions {
|
2019-10-28 13:46:04 +00:00
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
2019-05-06 07:01:33 +00:00
|
|
|
}
|
2017-04-10 13:24:59 +00:00
|
|
|
}
|
|
|
|
|
2013-11-25 22:19:53 +00:00
|
|
|
dependencies {
|
2019-10-29 17:19:06 +00:00
|
|
|
implementation 'org.permissionsdispatcher:permissionsdispatcher:4.6.0'
|
|
|
|
kapt 'org.permissionsdispatcher:permissionsdispatcher-processor:4.6.0'
|
2019-05-06 07:01:33 +00:00
|
|
|
|
|
|
|
implementation 'com.github.salomonbrys.kodein:kodein:4.1.0'
|
|
|
|
compileOnly 'org.glassfish:javax.annotation:3.1.1'
|
|
|
|
|
2020-02-15 22:17:33 +00:00
|
|
|
androidTestImplementation 'com.github.ligi:trulesk:0.30'
|
|
|
|
androidTestUtil 'com.linkedin.testbutler:test-butler-app:2.1.0'
|
|
|
|
|
2019-10-28 13:49:37 +00:00
|
|
|
androidTestImplementation 'androidx.test:core:1.2.0'
|
2019-10-28 14:01:15 +00:00
|
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
2019-10-28 14:01:31 +00:00
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
|
2019-10-29 15:43:54 +00:00
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
|
2019-05-06 07:01:33 +00:00
|
|
|
androidTestImplementation 'com.squareup.assertj:assertj-android:1.2.0'
|
|
|
|
androidTestImplementation "org.mockito:mockito-core:$mockito_version"
|
2019-10-28 10:48:39 +00:00
|
|
|
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.25.0'
|
2019-05-06 07:01:33 +00:00
|
|
|
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.2'
|
|
|
|
androidTestImplementation 'com.google.android.material:material:1.0.0'
|
2020-02-16 03:21:06 +00:00
|
|
|
androidTestImplementation 'org.threeten:threetenbp:1.4.1'
|
2019-10-29 15:43:54 +00:00
|
|
|
|
2019-05-06 07:01:33 +00:00
|
|
|
|
|
|
|
implementation 'com.github.ligi:TouchImageView:2.1'
|
2019-10-29 17:02:29 +00:00
|
|
|
implementation 'com.github.ligi:ExtraCompats:1.0'
|
2020-02-16 04:37:58 +00:00
|
|
|
implementation 'net.lingala.zip4j:zip4j:2.3.1'
|
2020-02-16 03:21:06 +00:00
|
|
|
implementation 'com.jakewharton.threetenabp:threetenabp:1.2.2'
|
2019-05-06 07:01:33 +00:00
|
|
|
implementation 'org.greenrobot:eventbus:3.1.1'
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
|
|
|
2019-10-28 14:49:58 +00:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
2019-10-29 17:12:18 +00:00
|
|
|
implementation 'androidx.preference:preference:1.1.0'
|
2019-10-29 17:12:36 +00:00
|
|
|
implementation 'androidx.annotation:annotation:1.1.0'
|
2020-02-16 04:34:07 +00:00
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
2019-05-06 07:01:33 +00:00
|
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
|
|
implementation 'com.google.android.material:material:1.0.0'
|
|
|
|
implementation 'net.i2p.android.ext:floatingactionbutton:1.10.1'
|
|
|
|
|
2019-10-29 17:00:33 +00:00
|
|
|
implementation 'com.github.ligi:KAXT:1.0'
|
2019-10-29 17:02:29 +00:00
|
|
|
implementation 'com.github.ligi:KAXTUI:1.0'
|
2019-05-06 07:01:33 +00:00
|
|
|
implementation 'com.github.ligi:loadtoast:1.10.11'
|
2019-10-29 17:02:55 +00:00
|
|
|
implementation 'com.github.ligi:tracedroid:3.0'
|
2019-05-06 07:01:33 +00:00
|
|
|
|
2020-02-16 04:17:01 +00:00
|
|
|
forPlayImplementation 'com.github.ligi.snackengage:snackengage-playrate:0.24'
|
|
|
|
forFDroidImplementation 'com.github.ligi.snackengage:snackengage-playrate:0.24'
|
|
|
|
forAmazonImplementation 'com.github.ligi.snackengage:snackengage-amazonrate:0.24'
|
2019-05-06 07:01:33 +00:00
|
|
|
|
|
|
|
// https://medium.com/square-corner-blog/okhttp-3-13-requires-android-5-818bb78d07ce
|
|
|
|
// Don't update to >=3.13 before minSDK 21 + Java 8
|
|
|
|
//noinspection GradleDependency
|
|
|
|
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
|
|
|
|
|
|
|
|
implementation 'com.larswerkman:HoloColorPicker:1.5'
|
|
|
|
implementation 'com.google.code.findbugs:jsr305:3.0.2'
|
|
|
|
|
2020-02-16 03:45:57 +00:00
|
|
|
implementation 'com.squareup.okio:okio:2.2.2'
|
|
|
|
|
2020-02-16 04:21:23 +00:00
|
|
|
implementation 'com.squareup.moshi:moshi:1.9.2'
|
|
|
|
kapt("com.squareup.moshi:moshi-kotlin-codegen:1.9.2")
|
2019-05-06 07:01:33 +00:00
|
|
|
|
2020-02-16 03:33:50 +00:00
|
|
|
implementation 'com.chibatching.kotpref:kotpref:2.10.0'
|
|
|
|
implementation 'com.chibatching.kotpref:initializer:2.10.0'
|
2019-10-28 14:11:51 +00:00
|
|
|
testImplementation 'androidx.annotation:annotation:1.1.0'
|
2019-05-06 07:01:33 +00:00
|
|
|
testImplementation 'com.squareup.assertj:assertj-android:1.2.0'
|
|
|
|
testImplementation 'junit:junit:4.12'
|
|
|
|
testImplementation "org.mockito:mockito-core:$mockito_version"
|
2020-02-16 03:21:06 +00:00
|
|
|
testImplementation 'org.threeten:threetenbp:1.4.1'
|
2015-08-11 12:36:10 +00:00
|
|
|
|
2018-01-21 15:40:32 +00:00
|
|
|
// https://github.com/ligi/PassAndroid/issues/181
|
2019-05-06 07:01:33 +00:00
|
|
|
// Don't upgrade before minSDK 19 - or replace zxing
|
|
|
|
//noinspection GradleDependency
|
|
|
|
implementation 'com.google.zxing:core:3.3.0'
|
2014-06-05 12:30:08 +00:00
|
|
|
|
2020-02-16 03:45:57 +00:00
|
|
|
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2'
|
2015-06-15 21:50:58 +00:00
|
|
|
|
2019-05-06 07:01:33 +00:00
|
|
|
// requires minSDK 16 according to docs, not sure if it causes an issue
|
2019-10-29 17:20:48 +00:00
|
|
|
withAnalyticsImplementation 'com.google.android.gms:play-services-analytics:17.0.0'
|
|
|
|
withMapsImplementation 'com.google.android.gms:play-services-maps:17.0.0'
|
2013-11-25 22:19:53 +00:00
|
|
|
}
|
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
|
2019-05-06 07:01:33 +00:00
|
|
|
}
|