Files
traccar-client-android/app/build.gradle
T
2020-09-28 21:21:16 -07:00

75 строки
2.0 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 65
versionName '6.4'
multiDexEnabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
}
lintOptions {
checkReleaseBuilds false
}
flavorDimensions 'default'
productFlavors {
regular {
isDefault = 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.3.0-alpha02'
implementation 'androidx.multidex:multidex:2.0.1'
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.5.0'
googleImplementation 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
googleImplementation 'com.google.firebase:firebase-analytics:17.5.0'
googleImplementation 'com.google.android.gms:play-services-location:17.1.0'
}
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-client-android.json'
rename('traccar-client-android.json', 'google-services.json')
}
afterEvaluate {
preBuild.dependsOn copyJson
}
}