apply plugin: 'com.android.application' android { compileSdkVersion 27 buildToolsVersion "27.0.3" defaultConfig { applicationId "org.traccar.manager" minSdkVersion 19 targetSdkVersion 27 versionCode 15 versionName "2.5" } flavorDimensions "default" productFlavors { regular google } } dependencies { compile 'com.android.support:design:27.1.0' testCompile 'junit:junit:4.12' testCompile 'org.robolectric:robolectric:3.6.1' googleCompile 'com.google.firebase:firebase-core:11.8.0' googleCompile 'com.crashlytics.sdk.android:crashlytics:2.9.1' } 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 } }