2019-11-26 12:29:16 -08:00
import cash.z.ecc.android.Deps
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
2020-01-08 00:42:49 -08:00
apply plugin: 'com.google.gms.google-services'
2020-01-13 16:09:22 -08:00
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.firebase-perf'
2019-11-26 12:29:16 -08:00
//apply plugin: 'com.github.ben-manes.versions'
archivesBaseName = 'zcash-android-wallet'
group = 'cash.z.ecc.android'
2020-06-10 04:49:38 -07:00
version = '1.0.0-alpha28'
2019-11-26 12:29:16 -08:00
android {
2020-06-10 04:49:38 -07:00
ndkVersion "21.1.6352462"
2019-11-26 12:29:16 -08:00
compileSdkVersion Deps . compileSdkVersion
buildToolsVersion Deps . buildToolsVersion
viewBinding . enabled = true
defaultConfig {
applicationId 'cash.z.ecc.android'
minSdkVersion Deps . minSdkVersion
targetSdkVersion Deps . targetSdkVersion
2020-03-27 13:47:07 -07:00
versionCode = 1 _00_00_025
2020-02-21 16:03:00 -08:00
// last digits are alpha(0XX) beta(2XX) rc(4XX) release(8XX) dev(9XX). Ex: 1_08_04_401 is an release candidate build of version 1.8.4 and 1_08_04_800 would be the final release.
2019-11-26 12:29:16 -08:00
versionName = "$version"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
2019-12-23 11:21:38 -08:00
testInstrumentationRunnerArguments clearPackageData: 'true'
multiDexEnabled true
2019-11-26 12:29:16 -08:00
}
flavorDimensions 'network'
productFlavors {
// would rather name them "testnet" and "mainnet" but product flavor names cannot start with the word "test"
zcashtestnet {
dimension 'network'
applicationId 'cash.z.ecc.android.testnet'
matchingFallbacks = [ 'zcashtestnet' , 'debug' ]
}
zcashmainnet {
dimension 'network'
matchingFallbacks = [ 'zcashmainnet' , 'release' ]
}
}
2020-01-31 08:32:36 -08:00
// TODO: delete this test code
variantFilter { variant - >
def names = variant . flavors * . name
// To check for a certain build type, use variant.buildType.name == "<buildType>"
if ( names . contains ( "zcashtestnet" ) | | names . contains ( "Zcashtestnet" ) | | variant . buildType . name = = "release" ) {
// Gradle ignores any variants that satisfy the conditions above.
setIgnore ( true )
}
}
2019-11-26 12:29:16 -08:00
buildTypes {
release {
minifyEnabled true
2019-12-23 11:21:38 -08:00
shrinkResources true
2019-11-26 12:29:16 -08:00
useProguard false
proguardFiles getDefaultProguardFile ( 'proguard-android-optimize.txt' ) , 'proguard-rules.pro'
}
debug {
2019-12-23 11:21:38 -08:00
minifyEnabled false
shrinkResources false
2019-11-26 12:29:16 -08:00
useProguard false
proguardFiles getDefaultProguardFile ( 'proguard-android-optimize.txt' ) , 'proguard-rules.pro'
}
// mock {
// initWith debug
// matchingFallbacks = ['debug', 'release', 'zcashtestnet']
// }
}
signingConfigs {
debug {
// storeFile file("debug.keystore")
// keyAlias "androiddebugkey"
// keyPassword "android"
// storePassword "android"
}
}
compileOptions {
sourceCompatibility JavaVersion . VERSION_1_8
targetCompatibility JavaVersion . VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
2020-02-21 16:03:00 -08:00
2020-01-05 21:01:06 -08:00
kapt {
arguments {
arg 'dagger.fastInit' , 'enabled'
arg 'dagger.fullBindingGraphValidation' , 'ERROR'
arg 'dagger.gradle.incremental'
}
}
2019-12-18 10:24:06 -08:00
applicationVariants . all { variant - >
variant . outputs . all {
outputFileName = "$archivesBaseName-v${defaultConfig.versionName}-${variant.buildType.name}.apk"
}
}
2019-11-26 12:29:16 -08:00
}
2020-01-13 16:09:22 -08:00
crashlytics {
enableNdk true
}
2019-11-26 12:29:16 -08:00
dependencies {
implementation fileTree ( dir: 'libs' , include: [ '*.jar' ] )
implementation project ( ':qrecycler' )
2019-12-14 11:39:19 -08:00
implementation project ( ':feedback' )
2019-12-15 15:08:04 -08:00
implementation project ( ':mnemonic' )
implementation project ( ':lockbox' )
2020-05-27 11:36:04 -07:00
implementation project ( ':chipsinputlayout' )
2019-11-26 12:29:16 -08:00
2020-02-12 05:03:14 -08:00
// Zcash
2020-06-10 04:49:38 -07:00
implementation Deps . Zcash . ANDROID_WALLET_PLUGINS
zcashtestnetImplementation Deps . Zcash . Sdk . TESTNET
zcashmainnetImplementation Deps . Zcash . Sdk . MAINNET
2019-11-26 12:29:16 -08:00
// Kotlin
implementation Deps . Kotlin . STDLIB
// Android
2020-06-10 04:49:38 -07:00
implementation Deps . AndroidX . ANNOTATION
2019-11-26 12:29:16 -08:00
implementation Deps . AndroidX . APPCOMPAT
implementation Deps . AndroidX . CONSTRAINT_LAYOUT
2020-06-10 04:49:38 -07:00
implementation Deps . AndroidX . CORE_KTX
implementation Deps . AndroidX . FRAGMENT_KTX
implementation Deps . AndroidX . LEGACY
implementation Deps . AndroidX . PAGING
implementation Deps . AndroidX . CameraX . CAMERA2
implementation Deps . AndroidX . CameraX . CORE
implementation Deps . AndroidX . CameraX . LIFECYCLE
implementation Deps . AndroidX . CameraX . View . EXT
implementation Deps . AndroidX . CameraX . View . VIEW
2020-01-05 21:01:06 -08:00
implementation Deps . AndroidX . Lifecycle . LIFECYCLE_EXTENSIONS
2020-06-10 04:49:38 -07:00
implementation Deps . AndroidX . Lifecycle . LIFECYCLE_RUNTIME_KTX
2019-11-26 12:29:16 -08:00
implementation Deps . AndroidX . Navigation . FRAGMENT_KTX
implementation Deps . AndroidX . Navigation . UI_KTX
2020-06-10 04:49:38 -07:00
implementation Deps . AndroidX . Room . ROOM_KTX
kapt Deps . AndroidX . Room . ROOM_COMPILER
2019-11-26 12:29:16 -08:00
// Google
2020-06-10 04:49:38 -07:00
implementation Deps . Google . GUAVA
2019-11-26 12:29:16 -08:00
implementation Deps . Google . MATERIAL
2020-06-10 04:49:38 -07:00
implementation Deps . Google . ML_VISION // QR Scanner
2019-11-26 12:29:16 -08:00
// Dagger
implementation Deps . Dagger . ANDROID_SUPPORT
kapt Deps . Dagger . ANDROID_PROCESSOR
kapt Deps . Dagger . COMPILER
2019-12-14 11:39:19 -08:00
// grpc-java
2020-06-10 04:49:38 -07:00
implementation Deps . Grpc . ANDROID
implementation Deps . Grpc . OKHTTP
implementation Deps . Grpc . PROTOBUG
implementation Deps . Grpc . STUB
implementation Deps . JavaX . JAVA_ANNOTATION
// Analytics (for dogfooding/crash-reporting/feedback only on internal team builds)
implementation Deps . Analytics . CRASHLYTICS
implementation Deps . Analytics . CRASHLYTICS_NDK
implementation Deps . Analytics . FIREBASE
implementation Deps . Analytics . FIREBASE_PERF
implementation Deps . Analytics . MIXPANEL
2020-01-08 00:42:49 -08:00
2020-01-13 16:09:22 -08:00
// Misc.
2020-06-10 04:49:38 -07:00
implementation Deps . Misc . LOTTIE
2020-01-13 16:09:22 -08:00
2019-11-26 12:29:16 -08:00
// Tests
2020-06-10 04:49:38 -07:00
testImplementation Deps . Test . COROUTINES_TEST
2019-11-26 12:29:16 -08:00
testImplementation Deps . Test . JUNIT
2020-06-10 04:49:38 -07:00
testImplementation Deps . Test . MOKITO
2019-11-26 12:29:16 -08:00
androidTestImplementation Deps . Test . Android . JUNIT
androidTestImplementation Deps . Test . Android . ESPRESSO
}