2018-11-12 10:38:37 -08:00
// note: had to abandon the 'plugins' syntax because the navigation graph editor appears to have a bug where it adds kotlin-android and kotlin-android extensions "automatically" when it doesn't detect them. This would constantly break the build. TODO: file a bug on this at b.android.com
// the main side effect is that plugins have to include their classpath in the parent script, rather than just specifying the 'version' in the plugins dsl
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'deploygate'
apply plugin: 'com.github.ben-manes.versions'
2019-02-16 00:47:39 -08:00
apply plugin: 'com.google.gms.google-services'
2018-10-29 17:22:22 -07:00
android {
2018-10-31 22:19:50 -07:00
compileSdkVersion buildConfig . compileSdkVersion
2018-10-29 17:22:22 -07:00
defaultConfig {
2019-06-04 06:54:12 -07:00
applicationId "cash.z.android.zcon1"
2018-10-31 22:19:50 -07:00
minSdkVersion buildConfig . minSdkVersion
targetSdkVersion buildConfig . targetSdkVersion
2019-03-19 07:00:13 -07:00
versionCode 20 // todo: change this to 1_00_04 format, once we graduate beyond zero for the major version number because leading zeros indicate on octal number.
versionName "0.6.1-alpha"
2018-10-29 17:22:22 -07:00
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2019-02-28 12:56:25 -08:00
2018-10-29 18:08:54 -07:00
vectorDrawables . useSupportLibrary = true
2019-01-31 15:17:29 -08:00
multiDexEnabled true
2018-10-29 17:22:22 -07:00
}
2019-02-16 00:47:39 -08:00
2019-02-01 19:35:45 -08:00
dataBinding {
enabled true
}
2019-02-16 00:47:39 -08:00
flavorDimensions 'network'
productFlavors {
// product flavor names cannot start with the word "test" because they would clash with other targets
2019-03-19 07:00:13 -07:00
zcashtestnet {
2019-02-16 00:47:39 -08:00
dimension 'network'
2019-06-04 06:54:12 -07:00
applicationId 'cash.z.android.zcon1.testnet'
2019-03-19 07:00:13 -07:00
matchingFallbacks = [ 'debug' , 'zcashtestnet' ]
2019-02-16 00:47:39 -08:00
}
2019-03-19 07:00:13 -07:00
zcashmainnet {
2019-02-16 00:47:39 -08:00
dimension 'network'
2019-06-04 06:54:12 -07:00
applicationId 'cash.z.android.zcon1.mainnet'
2019-03-19 07:00:13 -07:00
matchingFallbacks = [ 'release' , 'zcashmainnet' ]
2019-02-16 00:47:39 -08:00
}
}
2018-10-29 17:22:22 -07:00
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile ( 'proguard-android-optimize.txt' ) , 'proguard-rules.pro'
}
2019-02-16 00:47:39 -08:00
mock {
initWith debug
2019-03-19 07:00:13 -07:00
matchingFallbacks = [ 'debug' , 'release' , 'zcashtestnet' ]
2019-02-16 00:47:39 -08:00
}
2018-10-29 17:22:22 -07:00
}
2019-02-16 00:47:39 -08:00
2018-12-02 17:28:44 -08:00
compileOptions {
sourceCompatibility JavaVersion . VERSION_1_8
targetCompatibility JavaVersion . VERSION_1_8
}
2019-02-16 00:47:39 -08:00
2019-01-31 15:17:02 -08:00
lintOptions {
lintConfig file ( "zcash-lint-options.xml" )
}
2018-10-29 17:22:22 -07:00
}
dependencies {
2018-10-31 22:39:33 -07:00
2018-11-11 19:36:17 -08:00
// Android
2018-10-31 22:19:50 -07:00
implementation deps . androidx . appcompat
2018-10-31 22:39:33 -07:00
implementation deps . androidx . constraintLayout
2018-12-04 11:38:12 -08:00
implementation deps . androidx . core
2018-10-31 22:39:33 -07:00
implementation deps . androidx . coreKtx
2018-10-31 22:19:50 -07:00
implementation deps . androidx . navigation . fragment
implementation deps . androidx . navigation . fragmentKtx
implementation deps . androidx . navigation . ui
implementation deps . androidx . navigation . uiKtx
implementation deps . material
2019-02-07 19:18:32 -08:00
implementation deps . androidx . multidex
2018-10-31 22:39:33 -07:00
2018-12-30 17:37:43 -08:00
// Kotlin
implementation deps . kotlin . stdlib
2019-02-07 19:18:32 -08:00
implementation deps . kotlin . reflect
2018-12-30 17:37:43 -08:00
implementation deps . kotlin . coroutines . core
implementation deps . kotlin . coroutines . android
2018-11-21 02:11:48 -08:00
// Zcash
implementation deps . zcash . walletSdk
2019-02-16 00:47:39 -08:00
implementation project ( path: ':qrecycler' )
2018-11-21 02:11:48 -08:00
2019-01-02 21:32:27 -08:00
// TODO: get the AAR to provide these
2019-03-19 07:00:13 -07:00
implementation "io.grpc:grpc-okhttp:1.19.0"
implementation "io.grpc:grpc-protobuf-lite:1.19.0"
implementation "io.grpc:grpc-stub:1.19.0"
implementation 'javax.annotation:javax.annotation-api:1.3.2'
implementation "androidx.room:room-runtime:2.1.0-alpha06"
implementation "androidx.room:room-common:2.1.0-alpha06"
implementation 'com.google.guava:guava:27.0.1-android'
kapt "androidx.room:room-compiler:2.1.0-alpha06"
2019-01-02 21:32:27 -08:00
2018-11-11 19:36:17 -08:00
// Dagger
implementation deps . dagger . android . support
kapt deps . dagger . android . processor
kapt deps . dagger . compiler
2018-12-04 23:26:03 -08:00
// Other
2018-12-02 19:21:23 -08:00
implementation deps . speeddial
2019-02-07 19:18:32 -08:00
implementation deps . lottie
debugImplementation deps . stetho
2019-02-16 00:47:39 -08:00
mockImplementation deps . stetho
2018-12-02 19:21:23 -08:00
2019-03-19 07:00:13 -07:00
testImplementation deps . mockito . jupiter
testImplementation deps . mockito . kotlin
testImplementation deps . junit5 . api
testImplementation deps . junit5 . engine
testImplementation deps . junit5 . migrationsupport
2019-02-17 21:05:40 -08:00
2018-10-31 22:19:50 -07:00
androidTestImplementation deps . androidx . test . runner
androidTestImplementation deps . androidx . test . espresso
2019-02-17 21:05:40 -08:00
2018-10-29 17:22:22 -07:00
}