apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { compileSdkVersion 30 defaultConfig { applicationId 'org.traccar.manager' minSdkVersion 19 targetSdkVersion 30 versionCode 28 versionName '2.17' } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } flavorDimensions 'default' productFlavors { regular { isDefault = true } google } } dependencies { implementation 'com.google.android.material:material:1.4.0' implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0' implementation 'androidx.preference:preference-ktx:1.1.1' implementation 'androidx.core:core-ktx:1.6.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" googleImplementation platform('com.google.firebase:firebase-bom:28.2.1') googleImplementation 'com.google.firebase:firebase-core' googleImplementation 'com.google.firebase:firebase-analytics' googleImplementation 'com.google.firebase:firebase-crashlytics' googleImplementation 'com.google.firebase:firebase-messaging' } if (getGradle().getStartParameter().getTaskRequests().toString().contains('Google')) { apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.crashlytics' task copyJson(type: Copy) { from '../../environment/google-services' into '.' include 'traccar-manager-android.json' rename('traccar-manager-android.json', 'google-services.json') } afterEvaluate { preBuild.dependsOn copyJson } }