Update migration guide to match installation guide
This commit is contained in:
parent
34286a3fd1
commit
402a6c46c6
|
@ -45,7 +45,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.2.3'
|
classpath 'com.android.tools.build:gradle:2.2.3'
|
||||||
classpath 'com.google.gms:google-services:3.1.0'
|
classpath 'com.google.gms:google-services:3.0.0'
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
}
|
}
|
||||||
|
@ -67,19 +67,22 @@ You need to make a couple of changes to your `app/build.gradle` file. Update th
|
||||||
compile(project(':react-native-firebase')) {
|
compile(project(':react-native-firebase')) {
|
||||||
transitive = false
|
transitive = false
|
||||||
}
|
}
|
||||||
compile "com.google.firebase:firebase-core:11.0.0"
|
compile "com.google.firebase:firebase-core:11.0.4"
|
||||||
|
|
||||||
|
// If you are receiving Google Play API availability issues, add the following dependency
|
||||||
|
compile "com.google.android.gms:play-services-base:11.0.4"
|
||||||
```
|
```
|
||||||
Add each of the firebase modules you need from the following list:
|
Add each of the firebase modules you need from the following list:
|
||||||
```groovy
|
```groovy
|
||||||
compile "com.google.firebase:firebase-ads:11.0.0"
|
compile "com.google.firebase:firebase-ads:11.0.4"
|
||||||
compile "com.google.firebase:firebase-analytics:11.0.0"
|
compile "com.google.firebase:firebase-analytics:11.0.4"
|
||||||
compile "com.google.firebase:firebase-auth:11.0.0"
|
compile "com.google.firebase:firebase-auth:11.0.4"
|
||||||
compile "com.google.firebase:firebase-config:11.0.0"
|
compile "com.google.firebase:firebase-config:11.0.4"
|
||||||
compile "com.google.firebase:firebase-crash:11.0.0"
|
compile "com.google.firebase:firebase-crash:11.0.4"
|
||||||
compile "com.google.firebase:firebase-database:11.0.0"
|
compile "com.google.firebase:firebase-database:11.0.4"
|
||||||
compile "com.google.firebase:firebase-messaging:11.0.0"
|
compile "com.google.firebase:firebase-messaging:11.0.4"
|
||||||
compile "com.google.firebase:firebase-perf:11.0.0"
|
compile "com.google.firebase:firebase-perf:11.0.4"
|
||||||
compile "com.google.firebase:firebase-storage:11.0.0"
|
compile "com.google.firebase:firebase-storage:11.0.4"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -93,7 +96,10 @@ compile "com.google.firebase:firebase-storage:11.0.0"
|
||||||
Update `MainApplication.java` and import the modules you require / currently use:
|
Update `MainApplication.java` and import the modules you require / currently use:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
import io.invertase.firebase.admob.RNFirebaseAdMobPackage; //Firebase AdMob
|
// Required package
|
||||||
|
import io.invertase.firebase.RNFirebasePackage; // <-- Keep this line
|
||||||
|
// Optional packages - add as appropriate
|
||||||
|
import io.invertase.firebase.admob.RNFirebaseAdMobPackage; // Firebase AdMob
|
||||||
import io.invertase.firebase.analytics.RNFirebaseAnalyticsPackage; // Firebase Analytics
|
import io.invertase.firebase.analytics.RNFirebaseAnalyticsPackage; // Firebase Analytics
|
||||||
import io.invertase.firebase.auth.RNFirebaseAuthPackage; // Firebase Auth
|
import io.invertase.firebase.auth.RNFirebaseAuthPackage; // Firebase Auth
|
||||||
import io.invertase.firebase.config.RNFirebaseRemoteConfigPackage; // Firebase Remote Config
|
import io.invertase.firebase.config.RNFirebaseRemoteConfigPackage; // Firebase Remote Config
|
||||||
|
@ -109,9 +115,8 @@ Add the packages to the `getPackages()` method as required:
|
||||||
protected List<ReactPackage> getPackages() {
|
protected List<ReactPackage> getPackages() {
|
||||||
return Arrays.<ReactPackage>asList(
|
return Arrays.<ReactPackage>asList(
|
||||||
new MainReactPackage(),
|
new MainReactPackage(),
|
||||||
new RNFirebasePackage(), // <-- Keep this line - it's the only one that's required
|
new RNFirebasePackage(), // <-- Keep this line
|
||||||
|
// Add these packages as appropriate
|
||||||
// add these optional packages as appropriate
|
|
||||||
new RNFirebaseAdMobPackage(),
|
new RNFirebaseAdMobPackage(),
|
||||||
new RNFirebaseAnalyticsPackage(),
|
new RNFirebaseAnalyticsPackage(),
|
||||||
new RNFirebaseAuthPackage(),
|
new RNFirebaseAuthPackage(),
|
||||||
|
|
Loading…
Reference in New Issue