PassAndroid/android/build.gradle

195 lines
6.6 KiB
Groovy
Raw Permalink Normal View History

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'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
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()
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 {
2020-03-05 02:27:48 +00:00
versionCode 356
versionName "3.5.6"
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"
vectorDrawables.useSupportLibrary = true
2015-01-25 23:07:50 +00:00
}
flavorDimensions "maps", "analytics", "distribution"
2014-01-15 23:42:39 +00:00
productFlavors {
2013-08-23 01:39:42 +00:00
withMaps {
dimension "maps"
}
noMaps {
dimension "maps"
}
withAnalytics {
dimension "analytics"
}
noAnalytics {
dimension "analytics"
}
forFDroid {
dimension "distribution"
}
2014-01-15 23:42:39 +00:00
forPlay {
dimension "distribution"
}
forAmazon {
dimension "distribution"
}
}
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
}
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'
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
}
lintOptions {
warning 'MissingTranslation'
warning 'InvalidPackage'
}
2016-01-25 23:19:15 +00:00
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
2016-01-25 23:19:15 +00:00
}
2020-02-29 19:47:13 +00:00
debug {
multiDexEnabled true
}
2016-01-25 23:19:15 +00:00
}
2019-05-06 07:01:33 +00:00
compileOptions {
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
}
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
2020-03-04 23:03:12 +00:00
implementation "org.koin:koin-android:2.1.2"
2019-05-06 07:01:33 +00:00
2020-02-29 17:26:02 +00:00
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3"
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0'
2020-02-29 02:04:43 +00:00
androidTestImplementation 'com.github.ligi:trulesk:0.31'
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'
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"
2020-02-16 04:55:36 +00:00
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.25.1'
2019-05-06 07:01:33 +00:00
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.2'
2020-02-16 03:21:06 +00:00
androidTestImplementation 'org.threeten:threetenbp:1.4.1'
2020-02-29 19:47:13 +00:00
androidTestImplementation 'com.android.support:multidex:1.0.3'
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-29 01:53:38 +00:00
implementation 'net.lingala.zip4j:zip4j:2.3.2'
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.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'
2020-02-16 05:30:26 +00:00
implementation 'com.google.android.material:material:1.1.0'
2019-05-06 07:01:33 +00:00
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
// 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'
}
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
}