Update versions and product flavors

This commit is contained in:
Kevin Gorham 2019-03-19 10:00:13 -04:00 committed by Kevin Gorham
parent 6e728592f2
commit e738fc6586
14 changed files with 151 additions and 34 deletions

View File

@ -14,8 +14,8 @@ android {
applicationId "cash.z.android.wallet"
minSdkVersion buildConfig.minSdkVersion
targetSdkVersion buildConfig.targetSdkVersion
versionCode 19 // 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.0-alpha"
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"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
@ -29,16 +29,16 @@ android {
flavorDimensions 'network'
productFlavors {
// product flavor names cannot start with the word "test" because they would clash with other targets
ztestnet {
zcashtestnet {
dimension 'network'
applicationId 'cash.z.android.wallet.testnet'
matchingFallbacks = ['debug']
matchingFallbacks = ['debug', 'zcashtestnet']
}
zmainnet {
zcashmainnet {
dimension 'network'
applicationId 'cash.z.android.wallet.mainnet'
matchingFallbacks = ['release']
matchingFallbacks = ['release', 'zcashmainnet']
}
}
@ -49,7 +49,7 @@ android {
}
mock {
initWith debug
matchingFallbacks = ['debug', 'release']
matchingFallbacks = ['debug', 'release', 'zcashtestnet']
}
}
@ -88,13 +88,14 @@ dependencies {
implementation project(path: ':qrecycler')
// TODO: get the AAR to provide these
implementation "io.grpc:grpc-okhttp:1.17.1"
implementation "io.grpc:grpc-protobuf-lite:1.17.1"
implementation "io.grpc:grpc-stub:1.17.1"
implementation 'javax.annotation:javax.annotation-api:1.2'
implementation "androidx.room:room-runtime:2.0.0"
implementation "androidx.room:room-common:2.0.0"
kapt "androidx.room:room-compiler:2.0.0"
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"
// Dagger
implementation deps.dagger.android.support
@ -107,11 +108,11 @@ dependencies {
debugImplementation deps.stetho
mockImplementation deps.stetho
testImplementation 'org.mockito:mockito-junit-jupiter:2.24.0'
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0'
testImplementation "org.junit.jupiter:junit-jupiter-api:5.4.0"
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.4.0"
testImplementation "org.junit.jupiter:junit-jupiter-migrationsupport:5.4.0"
testImplementation deps.mockito.jupiter
testImplementation deps.mockito.kotlin
testImplementation deps.junit5.api
testImplementation deps.junit5.engine
testImplementation deps.junit5.migrationsupport
androidTestImplementation deps.androidx.test.runner
androidTestImplementation deps.androidx.test.espresso

View File

@ -90,7 +90,7 @@ class ReceiveFragment : BaseFragment() {
// TODO: replace with tiered load. First check memory reference (textview contents?) then check DB, then load from JNI and write to DB
private fun loadAddress(): String {
return synchronizer.address
return synchronizer.getAddress()
}
}

View File

@ -61,7 +61,7 @@ class SendFragment : BaseFragment(), SendPresenter.SendView, ScanFragment.Barcod
}
}
override fun onAttachFragment(childFragment: Fragment?) {
override fun onAttachFragment(childFragment: Fragment) {
super.onAttachFragment(childFragment)
(childFragment as? ScanFragment)?.barcodeCallback = this
}

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/container_welcome"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_content_start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="32dp" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_content_end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_end="32dp" />
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lottie_welcome_sync"
android:layout_width="168dp"
android:layout_height="168dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.17"
app:lottie_autoPlay="true"
app:lottie_loop="false"
app:lottie_rawRes="@raw/lottie_welcome_firstrun"/>
<TextView
android:id="@+id/text_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:gravity="center"
android:text="What is new in this build?"
android:textColor="@color/walkthrough_text_header"
android:textSize="@dimen/text_size_h5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/lottie_welcome_sync" />
<TextView
android:id="@+id/text_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:justificationMode="inter_word"
android:text=" • Everything"
android:textColor="@color/walkthrough_text_body"
app:layout_constraintEnd_toEndOf="@id/guideline_content_end"
app:layout_constraintStart_toStartOf="@+id/guideline_content_start"
app:layout_constraintTop_toBottomOf="@+id/text_header" />
<ProgressBar
android:id="@+id/progress_sync"
android:transitionName="@string/transition_walkthrough_progress_bar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
app:layout_constraintBottom_toBottomOf="@+id/button_next"
app:layout_constraintEnd_toStartOf="@+id/button_next"
app:layout_constraintStart_toStartOf="@+id/guideline_content_start" />
<TextView
android:id="@+id/text_progress_sync"
android:transitionName="@string/transition_walkthrough_progress_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:lineSpacingExtra="12dp"
android:text="4% reticulating splines"
android:paddingEnd="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline_content_start"
app:layout_constraintTop_toBottomOf="@+id/progress_sync" />
<Button
android:id="@+id/button_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:background="@drawable/background_selector_primary_button"
android:enabled="false"
android:text="Loading..."
android:textColor="@color/walkthrough_button_text"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/guideline_content_end" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="is_testnet">false</bool>
</resources>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="zec_abbreviation">ZEC</string>
</resources>

View File

@ -0,0 +1 @@
zcashtestnet (copy)

View File

@ -5,16 +5,17 @@ buildscript {
'targetSdkVersion': 28
]
ext.versions = [
'dagger': '2.19',
'kotlin': '1.3.11',
'dagger': '2.22.1',
'kotlin': '1.3.21',
'coroutines': '1.1.0',
'navigation': '1.0.0-rc01'
'navigation': '1.0.0',
'junit5': '5.5.0-M1'
]
ext.deps = [
'androidx': [
'appcompat': 'androidx.appcompat:appcompat:1.0.0',
'constraintLayout': 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3',
'core': 'androidx.core:core:1.0.0',
'core': 'androidx.core:core:1.1.0-alpha05',
'coreKtx': 'androidx.core:core-ktx:1.0.0',
'multidex': 'androidx.multidex:multidex:2.0.1',
'navigation': [
@ -35,7 +36,11 @@ buildscript {
],
'compiler': "com.google.dagger:dagger-compiler:${versions.dagger}"
],
'junit': 'junit:junit:4.12',
'junit5': [
'api': "org.junit.jupiter:junit-jupiter-api:${versions.junit5}",
'engine': "org.junit.jupiter:junit-jupiter-engine:${versions.junit5}",
'migrationsupport': "org.junit.jupiter:junit-jupiter-api:${versions.junit5}"
],
'kotlin': [
'coroutines': [
'core': "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.coroutines}",
@ -44,12 +49,16 @@ buildscript {
'reflect': "org.jetbrains.kotlin:kotlin-reflect:${versions.kotlin}",
'stdlib': "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
],
'lottie': "com.airbnb.android:lottie:2.7.0",
'material': 'com.google.android.material:material:1.0.0',
'lottie': "com.airbnb.android:lottie:3.0.0",
'material': 'com.google.android.material:material:1.1.0-alpha05',
'mockito': [
'jupiter':'org.mockito:mockito-junit-jupiter:2.26.0',
'kotlin':'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0'
],
'speeddial': 'com.leinardi.android:speed-dial:2.0.0',
'stetho': 'com.facebook.stetho:stetho:1.5.0',
'stetho': 'com.facebook.stetho:stetho:1.5.1',
'zcash': [
'walletSdk': "cash.z.android.wallet:zcash-android-wallet-sdk:1.7.3@aar"
'walletSdk': "cash.z.android.wallet:zcash-android-testnet:1.7.5-alpha@aar"
]
]
repositories {
@ -57,9 +66,9 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0-alpha09'
classpath 'com.android.tools.build:gradle:3.5.0-alpha10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "com.github.ben-manes:gradle-versions-plugin:0.20.0"
classpath "com.github.ben-manes:gradle-versions-plugin:0.21.0"
classpath 'com.deploygate:gradle:1.1.5'
classpath 'com.google.gms:google-services:4.2.0'
}

View File

@ -1,6 +1,6 @@
#Sat Dec 29 22:41:09 EST 2018
#Fri Apr 05 00:33:25 EDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1-milestone-1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-all.zip