apply plugin: 'com.android.application' android { compileSdkVersion 28 buildToolsVersion '28.0.2' defaultConfig { applicationId 'org.traccar.manager' minSdkVersion 19 targetSdkVersion 28 versionCode 18 versionName '2.8' } flavorDimensions 'default' productFlavors { regular google } } dependencies { implementation 'com.android.support:design:28.0.0-rc02' googleImplementation 'com.google.firebase:firebase-core:16.0.3' googleImplementation 'com.google.firebase:firebase-messaging:17.3.2' googleImplementation 'com.crashlytics.sdk.android:crashlytics:2.9.5' } if (getGradle().getStartParameter().getTaskRequests().toString().contains('Google')) { apply plugin: 'com.google.gms.google-services' apply plugin: 'io.fabric' task copyJson(type: Copy) { from '../../traccar-shared/google-services' into '.' include 'traccar-manager-android.json' rename('traccar-manager-android.json', 'google-services.json') } afterEvaluate { preBuild.dependsOn copyJson } }