This plugin converts the google-services.json file for Firebase into a set of resources that the Firebase libraries can use. It also references the strict-version-matcher plugin, and will execute those checks as well.
Add the following to your project's settings.gradle:
pluginManagement {
repositories {
gradlePluginPortal()
google()
}
}
Apply the plugin in your app's build.gradle:
plugins {
id 'com.google.gms.google-services' version '4.2.0'
}
Add the following to your buildscript classpath, obtained from Google’s Maven repository:
classpath 'com.google.gms:google-services:4.2.0'
Apply the plugin in your app's build.gradle:
apply plugin: 'com.google.gms.google-services'
These instructions are also documented online