Skip to content

Commit 2609e02

Browse files
authored
Ensure release variants build successfully without any setup (#1228)
2 parents 677e139 + 34cc4b1 commit 2609e02

File tree

5 files changed

+49
-6
lines changed

5 files changed

+49
-6
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ android:
2222
# https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943
2323
- tools
2424
- tools
25-
before_script: mv library/google-services.json app/google-services.json
26-
script: ./gradlew clean assembleDebug check
25+
before_script:
26+
- cp library/google-services.json app/google-services.json
27+
- cp library/google-services.json proguard-tests/google-services.json
28+
script: ./gradlew clean assembleDebug proguard-tests:build check
2729
after_success: ./scripts/artifactory.sh
2830
after_failure:
2931
# tests

auth/auth-proguard.pro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Twitter and Facebook are optional
2-
-dontwarn com.twitter.**
32
-dontwarn com.facebook.**
4-
-dontwarn com.firebase.ui.auth.provider.**
3+
-dontwarn com.twitter.**
54

65
# Don't note a bunch of dynamically referenced classes
76
-dontnote com.google.**
@@ -16,5 +15,6 @@
1615

1716
# Retrofit config
1817
-dontnote retrofit2.Platform
19-
-dontwarn retrofit2.Platform$Java8
18+
-dontwarn retrofit2.** # Also keeps Twitter at bay as long as they keep using Retrofit
19+
-dontwarn okio.**
2020
-keepattributes Exceptions

proguard-tests/build.gradle

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion compileSdk
5+
6+
defaultConfig {
7+
applicationId "com.firebase.uidemo"
8+
minSdkVersion 16
9+
targetSdkVersion targetSdk
10+
versionCode 1
11+
versionName version
12+
}
13+
14+
buildTypes {
15+
release {
16+
// For the purposes of the sample, allow testing of a proguarded release build
17+
// using the debug key
18+
signingConfig signingConfigs.debug
19+
20+
postprocessing {
21+
removeUnusedCode true
22+
removeUnusedResources true
23+
obfuscate true
24+
optimizeCode true
25+
}
26+
}
27+
}
28+
}
29+
30+
dependencies {
31+
implementation "com.google.firebase:firebase-core:$firebaseVersion"
32+
33+
implementation project(path: ':auth')
34+
implementation project(path: ':firestore')
35+
implementation project(path: ':database')
36+
implementation project(path: ':storage')
37+
}
38+
39+
apply plugin: 'com.google.gms.google-services'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest package="com.firebase.uidemo"/>

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
include ':app', ':library', ':database', ':auth', ':storage', ':firestore', ':common',
2-
':internal:lint', ':internal:lintchecks'
2+
'proguard-tests', ':internal:lint', ':internal:lintchecks'

0 commit comments

Comments
 (0)