Skip to content

Commit

Permalink
Wire up firebase packages in the android project
Browse files Browse the repository at this point in the history
  • Loading branch information
akilburge committed Sep 23, 2017
1 parent 5f88fdd commit 7debdc5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
22 changes: 17 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ android {
}

dependencies {
compile project(':react-native-google-analytics-bridge')
compile (project(':react-native-google-analytics-bridge')) {
exclude group: 'com.google.android.gms'
}
compile project(':react-native-vector-icons')
compile project(':react-native-config')
compile fileTree(dir: "libs", include: ["*.jar"])
Expand All @@ -163,12 +165,20 @@ dependencies {
compile project(':react-native-navigation')

compile(project(':react-native-maps')) {
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
exclude group: 'com.google.android.gms'
}

compile(project(':react-native-firebase')) {
transitive = false
exclude group: 'com.google.android.gms'
}
compile "com.google.firebase:firebase-core:11.2.0"
compile "com.google.firebase:firebase-analytics:11.2.0"
compile "com.google.firebase:firebase-crash:11.2.0"

compile 'com.google.android.gms:play-services-base:11.+'
compile 'com.google.android.gms:play-services-maps:11.+'
compile 'com.google.android.gms:play-services-analytics:11.2.0'
compile 'com.google.android.gms:play-services-base:11.2.0'
compile 'com.google.android.gms:play-services-maps:11.2.0'
}

// Run this once to be able to run the application with BUCK
Expand All @@ -177,3 +187,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}

apply plugin: 'com.google.gms.google-services'
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
import com.oblador.vectoricons.VectorIconsPackage;
import com.idehub.GoogleAnalyticsBridge.GoogleAnalyticsBridgePackage;
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage;
import io.invertase.firebase.RNFirebasePackage;
import io.invertase.firebase.analytics.RNFirebaseAnalyticsPackage;
import io.invertase.firebase.crash.RNFirebaseCrashPackage;

import java.util.Arrays;
import java.util.List;
Expand All @@ -24,7 +27,10 @@ public List<ReactPackage> createAdditionalReactPackages() {
new ReactNativeConfigPackage(),
new MapsPackage(),
new VectorIconsPackage(),
new GoogleAnalyticsBridgePackage()
new GoogleAnalyticsBridgePackage(),
new RNFirebasePackage(),
new RNFirebaseAnalyticsPackage(),
new RNFirebaseCrashPackage()
);
}
}
4 changes: 4 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
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
Expand All @@ -20,5 +21,8 @@ allprojects {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
url 'https://maven.google.com'
}
}
}
5 changes: 4 additions & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ project(':react-native-config').projectDir = new File(rootProject.projectDir, '.

include ':app'
include ':react-native-navigation'
project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/android/app/')
project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/android/app/')

include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')

0 comments on commit 7debdc5

Please sign in to comment.