61 строка
1.4 KiB
Groovy
61 строка
1.4 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion 23
|
|
buildToolsVersion '23.0.3'
|
|
|
|
defaultConfig {
|
|
minSdkVersion 3
|
|
targetSdkVersion 23
|
|
versionCode 31
|
|
versionName '3.11'
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
storeFile file('../../android.keystore')
|
|
keyAlias 'tananaev'
|
|
storePassword ''
|
|
keyPassword ''
|
|
}
|
|
}
|
|
|
|
productFlavors {
|
|
regular {
|
|
applicationId "org.traccar.client"
|
|
buildConfigField "boolean", "HIDDEN_APP", "false"
|
|
}
|
|
hidden {
|
|
applicationId "org.traccar.client.hidden"
|
|
buildConfigField "boolean", "HIDDEN_APP", "true"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
|
|
lintOptions {
|
|
checkReleaseBuilds false
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
testCompile 'junit:junit:4.12'
|
|
testCompile 'org.robolectric:robolectric:3.0'
|
|
}
|
|
|
|
task requestPasswords << {
|
|
android.signingConfigs.release.storePassword = new String(System.console().readPassword('\nStore password: '))
|
|
android.signingConfigs.release.keyPassword = new String(System.console().readPassword('Key password: '))
|
|
}
|
|
|
|
tasks.whenTaskAdded { theTask ->
|
|
if (theTask.name.equals('packageRegularRelease') || theTask.name.equals('packageHiddenRelease')) {
|
|
theTask.dependsOn 'requestPasswords'
|
|
}
|
|
}
|