@@ -18,16 +18,11 @@ android {
1818 storeFile file(' debug.keystore' )
1919 storePassword ' droidkaigi'
2020 }
21-
22- if (isProductionBuild) {
23- release {
24- keyAlias System . getenv(" RELEASE_KEY_ALIAS" )
25- keyPassword System . getenv(" RELEASE_KEY_PASSWORD" )
26- storeFile System . getenv(" RELEASE_STORE_FILE" )
27- storePassword System . getenv(" RELEASE_PASSWORD" )
28- }
29- } else {
30- release. initWith(debug)
21+ release {
22+ keyAlias System . getenv(" RELEASE_KEY_ALIAS" )
23+ keyPassword System . getenv(" RELEASE_KEY_PASSWORD" )
24+ storeFile file(System . getenv(" RELEASE_STORE_FILE" ) ?: " debug.keystore" )
25+ storePassword System . getenv(" RELEASE_PASSWORD" )
3126 }
3227 }
3328 defaultConfig {
@@ -44,18 +39,21 @@ android {
4439 manifestPlaceholders = [isCi : String . valueOf(isCi)]
4540 }
4641 buildTypes {
47- release {
42+ staging {
4843 zipAlignEnabled true
4944 useProguard true
5045 minifyEnabled true
5146 shrinkResources true
5247 proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
48+ signingConfig = signingConfigs. debug
49+ matchingFallbacks = [' release' ]
50+ }
51+ release. initWith(staging)
52+ release {
53+ applicationIdSuffix null
54+ proguardFiles ' proguard-rules-production.pro'
5355 signingConfig = signingConfigs. release
54-
55- if (isProductionBuild) {
56- applicationIdSuffix null
57- proguardFiles ' proguard-rules-production.pro'
58- }
56+ matchingFallbacks = []
5957 }
6058 }
6159 dataBinding {
@@ -123,9 +121,11 @@ dependencies {
123121
124122 implementation Dep.Stetho . stetho
125123
126- releaseImplementation Dep.LeakCanary . leakCanary
127124 debugImplementation Dep.LeakCanary . leakCanary
128125 debugImplementation Dep.LeakCanary . leakCanaryFragment
126+ stagingImplementation Dep.LeakCanary . leakCanary
127+ stagingImplementation Dep.LeakCanary . leakCanaryFragment
128+ releaseImplementation Dep.LeakCanary . leakCanaryNoOp
129129
130130 implementation Dep.Firebase . core
131131 implementation Dep.Firebase . auth
0 commit comments