From 5d1e5fca1f65661c186750cdbfb4340727a95baa Mon Sep 17 00:00:00 2001 From: Mohit Gupta Date: Sat, 23 Jul 2016 16:29:43 -0700 Subject: [PATCH 1/3] add firebase google-analytics to the android build --- android/app/build.gradle | 1 + android/app/google-services.json | 42 ++++++++++++++++++++++++++++++++ android/build.gradle | 3 ++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 android/app/google-services.json diff --git a/android/app/build.gradle b/android/app/build.gradle index b01498b..ba63145 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -60,6 +60,7 @@ import com.android.build.OutputFile */ apply from: "../../node_modules/react-native/react.gradle" +apply plugin: 'com.google.gms.google-services' /** * Set this to true to create two separate APKs instead of one: diff --git a/android/app/google-services.json b/android/app/google-services.json new file mode 100644 index 0000000..30f3abe --- /dev/null +++ b/android/app/google-services.json @@ -0,0 +1,42 @@ +{ + "project_info": { + "project_number": "210256304232", + "firebase_url": "https://reading-challenge.firebaseio.com", + "project_id": "firebase-reading-challenge", + "storage_bucket": "firebase-reading-challenge.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:210256304232:android:f877e877388c3631", + "android_client_info": { + "package_name": "com.reactnativesource" + } + }, + "oauth_client": [ + { + "client_id": "210256304232-g4d1oq5kcqg99lmq1ji7idsvhhi363l2.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyBnf11FSPqc14tDUwLWzKilueFHZRPfhE8" + } + ], + "services": { + "analytics_service": { + "status": 1 + }, + "appinvite_service": { + "status": 1, + "other_platform_oauth_client": [] + }, + "ads_service": { + "status": 2 + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index 1fc8f95..88001d1 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -5,7 +5,8 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.1' + classpath 'com.android.tools.build:gradle:1.3.1', + classpath 'com.google.gms:google-services:3.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files From 4e5a31b79444ed12f1f72af8febfd713a87c7379 Mon Sep 17 00:00:00 2001 From: Mohit Gupta Date: Sat, 23 Jul 2016 17:10:22 -0700 Subject: [PATCH 2/3] missed a spot --- android/app/build.gradle | 4 +++- android/app/google-services.json | 2 +- android/build.gradle | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index ba63145..b784aff 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -60,7 +60,6 @@ import com.android.build.OutputFile */ apply from: "../../node_modules/react-native/react.gradle" -apply plugin: 'com.google.gms.google-services' /** * Set this to true to create two separate APKs instead of one: @@ -135,6 +134,7 @@ dependencies { compile fileTree(dir: "libs", include: ["*.jar"]) compile "com.android.support:appcompat-v7:23.0.1" compile "com.facebook.react:react-native:+" // From node_modules + compile 'com.google.firebase:firebase-core:9.2.1' } // Run this once to be able to run the application with BUCK @@ -143,3 +143,5 @@ task copyDownloadableDepsToLibs(type: Copy) { from configurations.compile into 'libs' } + +apply plugin: 'com.google.gms.google-services' diff --git a/android/app/google-services.json b/android/app/google-services.json index 30f3abe..1c8454e 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -39,4 +39,4 @@ } ], "configuration_version": "1" -} \ No newline at end of file +} diff --git a/android/build.gradle b/android/build.gradle index 88001d1..fe12d2b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.1', + classpath 'com.android.tools.build:gradle:1.3.1' classpath 'com.google.gms:google-services:3.0.0' // NOTE: Do not place your application dependencies here; they belong From fb80caf07796ebde59aff05519ca9628db1e227f Mon Sep 17 00:00:00 2001 From: Mohit Gupta Date: Sun, 24 Jul 2016 00:24:55 -0700 Subject: [PATCH 3/3] add react-native-firebase-analytics --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index b9d0305..4ab57bd 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "react-dom": "^0.14.7", "react-hot-loader": "^1.3.0", "react-native": "0.25.1", + "react-native-firebase-analytics": "^1.0.4", "react-native-icons": "^0.7.1", "react-native-navbar": "^1.5.0", "react-native-overlay": "^0.4.2",