Added conditional plugin initialization
Now, if the "com.google.gms.googleservices.GoogleServicesPlugin" has already been applied, this plugin won't, avoiding the error:
Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
Cannot add extension with name 'googleServices', as there is an extension already registered with that name.
Special thanks for @selombanybah, for mentioning the error.