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-02-21 16:03:00 -08:00
version = '1.0.0-alpha23'
2019-11-26 12:29:16 -08:00
android {
compileSdkVersion Deps . compileSdkVersion
buildToolsVersion Deps . buildToolsVersion
viewBinding . enabled = true
defaultConfig {
applicationId 'cash.z.ecc.android'
minSdkVersion Deps . minSdkVersion
targetSdkVersion Deps . targetSdkVersion
2020-02-21 16:03:00 -08:00
versionCode = 1 _00_00_023
// 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
2020-01-13 16:09:22 -08:00
// manifestPlaceholders = [rollbarToken: properties["rollbarToken"]]
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' )
2019-12-23 11:21:38 -08:00
implementation project ( ':sdk' )
2019-11-26 12:29:16 -08:00
2020-02-12 05:03:14 -08:00
// Zcash
implementation 'com.github.zcash:zcash-android-wallet-plugins:1.0.0'
2019-11-26 12:29:16 -08:00
// Kotlin
implementation Deps . Kotlin . STDLIB
// Android
implementation Deps . AndroidX . APPCOMPAT
implementation Deps . AndroidX . CORE_KTX
implementation Deps . AndroidX . CONSTRAINT_LAYOUT
implementation Deps . AndroidX . Lifecycle . LIFECYCLE_RUNTIME_KTX
2020-01-05 21:01:06 -08:00
implementation Deps . AndroidX . Lifecycle . LIFECYCLE_EXTENSIONS
2019-11-26 12:29:16 -08:00
implementation Deps . AndroidX . Navigation . FRAGMENT_KTX
implementation Deps . AndroidX . Navigation . UI_KTX
2019-12-23 16:07:10 -08:00
implementation "androidx.room:room-ktx:2.2.3"
implementation "androidx.paging:paging-runtime-ktx:2.1.1"
implementation 'com.google.guava:guava:27.0.1-android'
kapt "androidx.room:room-compiler:2.2.3"
2019-11-26 12:29:16 -08:00
// Google
implementation Deps . Google . MATERIAL
// Dagger
implementation Deps . Dagger . ANDROID_SUPPORT
kapt Deps . Dagger . ANDROID_PROCESSOR
kapt Deps . Dagger . COMPILER
2019-12-23 11:21:38 -08:00
// Testing these BIP39 dependencies
implementation 'com.madgag.spongycastle:core:1.58.0.0'
implementation 'io.github.novacrypto:BIP39:2019.01.27'
implementation 'io.github.novacrypto:securestring:2019.01.27'
2019-12-14 11:39:19 -08:00
// grpc-java
2020-02-21 16:03:00 -08:00
implementation "io.grpc:grpc-okhttp:1.25.0"
implementation "io.grpc:grpc-android:1.25.0"
implementation "io.grpc:grpc-protobuf-lite:1.25.0"
implementation "io.grpc:grpc-stub:1.25.0"
2019-12-14 11:39:19 -08:00
implementation 'javax.annotation:javax.annotation-api:1.3.2'
// solves error: Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules jetified-guava-26.0-android.jar (com.google.guava:guava:26.0-android) and listenablefuture-1.0.jar (com.google.guava:listenablefuture:1.0)
// per this recommendation from Chris Povirk, given guava's decision to split ListenableFuture away from Guava: https://groups.google.com/d/msg/guava-discuss/GghaKwusjcY/bCIAKfzOEwAJ
implementation 'com.google.guava:guava:27.0.1-android'
2020-01-13 16:09:22 -08:00
// Analytics
2019-12-14 11:39:19 -08:00
implementation 'com.mixpanel.android:mixpanel-android:5.6.3'
2020-02-12 05:03:14 -08:00
implementation 'com.google.firebase:firebase-analytics:17.2.2'
2020-01-13 16:09:22 -08:00
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.1.1'
2020-02-12 05:03:14 -08:00
implementation 'com.google.firebase:firebase-perf:19.0.5'
2019-11-26 12:29:16 -08:00
2020-01-08 00:42:49 -08:00
// QR Scanning
implementation 'com.google.firebase:firebase-ml-vision:24.0.1'
2020-02-12 05:03:14 -08:00
implementation 'androidx.camera:camera-core:1.0.0-alpha10'
implementation 'androidx.camera:camera-camera2:1.0.0-alpha10'
implementation "androidx.camera:camera-view:1.0.0-alpha07"
implementation "androidx.camera:camera-extensions:1.0.0-alpha07"
implementation "androidx.camera:camera-lifecycle:1.0.0-alpha10"
2020-01-08 00:42:49 -08:00
2020-01-13 16:09:22 -08:00
// Misc.
implementation 'com.airbnb.android:lottie:3.1.0'
implementation 'com.facebook.stetho:stetho:1.5.1'
2020-02-12 05:03:14 -08:00
// check for build errors at https://jitpack.io/com/github/gmale/chips-input-layout/<version>/build.log
// implementation 'com.github.gmale:chips-input-layout:4750760a7222bc04ca48266b387456d2b03541a7'
2020-01-31 08:31:36 -08:00
2020-02-12 05:03:14 -08:00
implementation project ( ':chipsinputlayout' )
implementation 'androidx.annotation:annotation:1.1.0'
2020-01-13 16:09:22 -08:00
2019-11-26 12:29:16 -08:00
// Tests
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation Deps . Test . JUNIT
2020-01-15 07:32:54 -08:00
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.3'
2019-11-26 12:29:16 -08:00
androidTestImplementation Deps . Test . Android . JUNIT
androidTestImplementation Deps . Test . Android . ESPRESSO
}