82 строки
2.4 KiB
Groovy
82 строки
2.4 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
|
|
android {
|
|
compileSdkVersion 31
|
|
|
|
defaultConfig {
|
|
applicationId 'org.traccar.client'
|
|
buildConfigField 'boolean', 'HIDDEN_APP', 'false'
|
|
minSdkVersion 16
|
|
targetSdkVersion 31
|
|
versionCode 73
|
|
versionName '6.12'
|
|
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.5.0-alpha04'
|
|
implementation 'androidx.multidex:multidex:2.0.1'
|
|
implementation 'androidx.preference:preference-ktx:1.1.1'
|
|
implementation 'androidx.test:core-ktx:1.4.0'
|
|
implementation 'androidx.core:core-ktx:1.6.0'
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
implementation 'com.github.judemanutd:autostarter:1.1.0'
|
|
testImplementation 'junit:junit:4.13.2'
|
|
testImplementation 'org.robolectric:robolectric:4.6.1'
|
|
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.android.gms:play-services-location:18.0.0'
|
|
googleImplementation 'com.google.android.play:core:1.10.2'
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|