Skip to content

Commit 3d2e7d8

Browse files
committed
Declares Android Firebase Messaging dependency as api to allow it to be accessed from the app
An app shouldn’t have to define the the Firebase Messaging dependency in order to access it, as it’s already included within this plugin. By declaring it as an `api` dependency, this allows the app to access it and removes an extra step from the setup.
1 parent 2849471 commit 3d2e7d8

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

packages/firebase_messaging/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 6.0.15
2+
3+
* Declares Android Firebase Messaging dependency as `api` to allow it to be accessed from the app, and updates documentation.
4+
15
## 6.0.14
26

37
* Fix for missing UserAgent.h compilation failures.

packages/firebase_messaging/README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,6 @@ for more.
6161

6262
By default background messaging is not enabled. To handle messages in the background:
6363

64-
1. Add the `com.google.firebase:firebase-messaging` dependency in your app-level `build.gradle` file that is typically located at `<app-name>/android/app/build.gradle`.
65-
66-
```gradle
67-
dependencies {
68-
// ...
69-
70-
implementation 'com.google.firebase:firebase-messaging:<latest_version>'
71-
}
72-
```
73-
74-
Note: you can find out what the latest version of the plugin is [here ("Cloud Messaging")](https://firebase.google.com/support/release-notes/android#latest_sdk_versions).
75-
7664
1. Add an `Application.java` class to your app in the same directory as your `MainActivity.java`. This is typically found in `<app-name>/android/app/src/main/java/<app-organization-path>/`.
7765

7866
```java

packages/firebase_messaging/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ android {
3232
disable 'InvalidPackage'
3333
}
3434
dependencies {
35-
implementation 'com.google.firebase:firebase-messaging:20.0.1'
35+
api 'com.google.firebase:firebase-messaging:20.1.0'
3636
implementation 'androidx.annotation:annotation:1.1.0'
3737
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
3838
}

packages/firebase_messaging/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: firebase_messaging
22
description: Flutter plugin for Firebase Cloud Messaging, a cross-platform
33
messaging solution that lets you reliably deliver messages on Android and iOS.
44
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_messaging
5-
version: 6.0.14
5+
version: 6.0.15
66

77
flutter:
88
plugin:

0 commit comments

Comments
 (0)