63 строки
1.6 KiB
Groovy
63 строки
1.6 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion 29
|
|
|
|
defaultConfig {
|
|
applicationId 'org.traccar.client'
|
|
buildConfigField 'boolean', 'HIDDEN_APP', 'false'
|
|
minSdkVersion 16
|
|
targetSdkVersion 29
|
|
versionCode 63
|
|
versionName '6.2'
|
|
}
|
|
|
|
lintOptions {
|
|
checkReleaseBuilds false
|
|
}
|
|
|
|
flavorDimensions 'default'
|
|
productFlavors {
|
|
regular {
|
|
isDefault.set(true)
|
|
}
|
|
google
|
|
hidden {
|
|
applicationId 'org.traccar.client.hidden'
|
|
buildConfigField 'boolean', 'HIDDEN_APP', 'true'
|
|
}
|
|
}
|
|
|
|
testOptions {
|
|
unitTests {
|
|
includeAndroidResources = true
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'com.google.android.material:material:1.2.0-alpha06'
|
|
implementation 'androidx.preference:preference:1.1.1'
|
|
testImplementation 'junit:junit:4.13'
|
|
testImplementation 'org.robolectric:robolectric:4.1'
|
|
googleImplementation 'com.google.firebase:firebase-core:17.3.0'
|
|
googleImplementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
|
googleImplementation 'com.google.android.gms:play-services-location:17.0.0'
|
|
}
|
|
|
|
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-client-android.json'
|
|
rename('traccar-client-android.json', 'google-services.json')
|
|
}
|
|
|
|
afterEvaluate {
|
|
preBuild.dependsOn copyJson
|
|
}
|
|
}
|