What does _apply plugin: 'com.google.gms.google-services'_ do?
Asked Answered
F

1

-1

What does exactly adding apply plugin: 'com.google.gms.google-services' do? If I comment this, my app still will compile and run. More about adding Firebase to the project here.

Fab answered 10/11, 2017 at 21:59 Comment(1)
It is explained hereJudgeship
M
2

It reads resources out of your google-services.json file as described here. It also adds a compile dependency on firebase-core if not already present. That dependency will cause FirebaseInitProvider to get merged into your manifest, which is responsible for initializing a default FirebaseApp at app launch with the resources it read during the build phase.

If you want to learn more about Firebase app init, read:

Motherinlaw answered 10/11, 2017 at 22:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.