Skip to content

Commit

Permalink
Pin Firebase and Crashlytics Gradle dependencies to latest major vers…
Browse files Browse the repository at this point in the history
…ion (to prevent build failures due to unexpected changes in subsequent major versions).
  • Loading branch information
dpa99c committed Jun 20, 2019
1 parent 644faaf commit df8d493
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ To help ensure this plugin is kept updated, new features are added and bugfixes


## Supported Cordova Versions
- cordova: `>= 6`
- cordova-android: `>= 6.4`
- cordova: `>= 8`
- cordova-android: `>= 8`
- cordova-ios: `>= 4`

## Migrating from cordova-plugin-firebase
Expand All @@ -34,7 +34,7 @@ Install the plugin by adding it to your project's config.xml:
```
or by running:
```
cordova plugin add cordova-plugin-firebasex --save
cordova plugin add cordova-plugin-firebasex
```

### Guides
Expand Down Expand Up @@ -64,7 +64,7 @@ Hooks do not work with PhoneGap Build. This means you will have to manually make
### Google Play Services
Your build may fail if you are installing multiple plugins that use Google Play Services. This is caused by the plugins installing different versions of the Google Play Services library. This can be resolved by installing [cordova-android-play-services-gradle-release](https://github.com/dpa99c/cordova-android-play-services-gradle-release).

If your build is still failing, you can try installing [cordova-android-firebase-gradle-release](https://github.com/dpa99c/cordova-android-firebase-gradle-release). For more info, read the following [comment](https://github.com/dpa99c/cordova-plugin-request-location-accuracy/issues/50#issuecomment-390025013) about locking down the specific versions for play services and firebase. It is suggested to use `+` instead of `15.+` to ensure the correct versions are used.
If your build is still failing, you can try installing [cordova-android-firebase-gradle-release](https://github.com/dpa99c/cordova-android-firebase-gradle-release). For more info, read the following [comment](https://github.com/dpa99c/cordova-plugin-request-location-accuracy/issues/50#issuecomment-390025013) about locking down the specific versions for play services and firebase.

## Google Tag Manager

Expand Down
18 changes: 12 additions & 6 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
<dependency id="cordova-plugin-androidx" version="^1.0.2" />

<engines>
<engine name="cordova" version=">=3.2.0" />
<engine name="cordova" version=">=8" />
<engine name="cordova-android" version=">=8" />
<engine name="cordova-ios" version=">=4" />
</engines>

<platform name="android">
Expand Down Expand Up @@ -50,11 +52,15 @@
<source-file src="src/android/colors.xml" target-dir="res/values" />

<framework src="src/android/build.gradle" custom="true" type="gradleReference" />
<framework src="com.google.android.gms:play-services-tagmanager:+" />
<framework src="com.google.firebase:firebase-core:+" />
<framework src="com.google.firebase:firebase-messaging:+" />
<framework src="com.google.firebase:firebase-config:+" />
<framework src="com.google.firebase:firebase-perf:+" />
<framework src="com.google.android.gms:play-services-tagmanager:17.+" />
<framework src="com.google.firebase:firebase-core:17.+" />
<framework src="com.google.firebase:firebase-messaging:19.+" />
<framework src="com.google.firebase:firebase-config:18.+" />
<framework src="com.google.firebase:firebase-perf:18.+" />
<framework src="com.google.firebase:firebase-auth:18.+" />
<framework src="com.crashlytics.sdk.android:crashlytics:2.+" />
<framework src="me.leolin:ShortcutBadger:1.+" />

</platform>

<platform name="ios">
Expand Down
15 changes: 4 additions & 11 deletions src/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
buildscript {
repositories {
jcenter()
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:+'
classpath 'com.google.gms:google-services:4.1.0'
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}
repositories {
Expand All @@ -15,14 +16,6 @@ repositories {
}
}

dependencies {
compile 'me.leolin:ShortcutBadger:1.1.4@aar'
compile 'com.google.firebase:firebase-auth:+'
compile('com.crashlytics.sdk.android:crashlytics:2.9.8@aar') {
transitive = true
}
}

cdvPluginPostBuildExtras.add({
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
Expand Down

0 comments on commit df8d493

Please sign in to comment.