Skip to content

Commit d8ec049

Browse files
committed
fix: Updated Flutter Push Notification configuration
1 parent 7153239 commit d8ec049

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

src/fragments/lib/push-notifications/common/getting_started/cross-platform-prereq.mdx

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,24 @@ If you prefer using the plugins DSL, you should add the `plugins` block to the v
4545
</InlineFilter>
4646

4747
<InlineFilter filters={['flutter']}>
48-
49-
The Firebase documentation directs you to add the Google services plugin to your app `settings.gradle` using the [Gradle plugins DSL](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block). However, we recommend you continue to use the [Legacy Plugin Application](https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_application) instead:
50-
51-
```groovy
52-
id "com.google.gms.google-services" version "4.3.14" apply false
48+
1. Open `android/settings.gradle.kts` and add the Google Services plugin:
49+
```diff title="android/settings.gradle.kts"
50+
plugins {
51+
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
52+
id("com.android.application") version "8.1.0" apply false
53+
id("org.jetbrains.kotlin.android") version "1.9.10" apply false
54+
+ id("com.google.gms.google-services") version "4.3.14" apply false
55+
}
56+
```
57+
2. Open `android/app/build.gradle.kts` and add the Google Services plugin:
58+
```diff title="android/app/build.gradle.kts"
59+
plugins {
60+
id("com.android.application")
61+
id("kotlin-android")
62+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
63+
id("dev.flutter.flutter-gradle-plugin")
64+
+ id("com.google.gms.google-services")
65+
}
5366
```
5467

5568
</InlineFilter>

0 commit comments

Comments
 (0)