From 1f1bd4e15951e2821b68c1d097904bbd04db8f1e Mon Sep 17 00:00:00 2001 From: Lyla Date: Wed, 28 Oct 2015 21:59:36 -0700 Subject: [PATCH 1/2] 1.01 Connect Firebase to Your App - Quiz --- app/build.gradle | 11 ++++++++++- app/src/main/AndroidManifest.xml | 2 ++ .../shoppinglistplusplus/ShoppingListApplication.java | 1 + .../shoppinglistplusplus/utils/Constants.java | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 979a9ad..43bb6f5 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,10 +17,17 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { - } } + // TODO This for anyone following along with the repo. Since you will have a different + // root URL, this code loads up a value from your gradle.properties file. + buildTypes.each { + it.buildConfigField 'String', 'UNIQUE_FIREBASE_ROOT_URL', UniqueFirebaseRootUrl + } + + // TODO Step 1: Add the packaging options here + } dependencies { @@ -30,6 +37,8 @@ dependencies { compile 'com.android.support:support-v4:23.0.1' compile 'com.android.support:cardview-v7:23.0.1' + // TODO Step 1: Add the Firebase library here + /* For Google Play Services */ compile 'com.google.android.gms:play-services-safetynet:8.3.0' compile 'com.google.android.gms:play-services-auth:8.3.0' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cda4cec..baa536d 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,8 @@ + + Date: Tue, 10 Nov 2015 10:38:07 -0800 Subject: [PATCH 2/2] 1.02 Connect Firebase to Your App - Solution --- app/build.gradle | 14 ++++++++++---- app/src/main/AndroidManifest.xml | 2 +- .../ShoppingListApplication.java | 5 ++++- .../shoppinglistplusplus/utils/Constants.java | 4 +++- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 43bb6f5..057d9df 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -20,13 +20,19 @@ android { } } - // TODO This for anyone following along with the repo. Since you will have a different - // root URL, this code loads up a value from your gradle.properties file. + /* This for anyone following along with the repo. Since you will have a different + * root URL, this code loads up a value from your gradle.properties file. + */ + buildTypes.each { it.buildConfigField 'String', 'UNIQUE_FIREBASE_ROOT_URL', UniqueFirebaseRootUrl } - // TODO Step 1: Add the packaging options here + packagingOptions { + exclude 'META-INF/LICENSE' + exclude 'META-INF/LICENSE-FIREBASE.txt' + exclude 'META-INF/NOTICE' + } } @@ -37,7 +43,7 @@ dependencies { compile 'com.android.support:support-v4:23.0.1' compile 'com.android.support:cardview-v7:23.0.1' - // TODO Step 1: Add the Firebase library here + compile 'com.firebase:firebase-client-android:2.4.0' /* For Google Play Services */ compile 'com.google.android.gms:play-services-safetynet:8.3.0' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index baa536d..45bb91e 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,7 +2,7 @@ - +