46 строки
1.0 KiB
Groovy
46 строки
1.0 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion 22
|
|
buildToolsVersion "22.0.1"
|
|
|
|
defaultConfig {
|
|
minSdkVersion 3
|
|
targetSdkVersion 22
|
|
versionCode 24
|
|
versionName "3.4"
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
storeFile file('../../android.keystore')
|
|
keyAlias "tananaev"
|
|
storePassword ""
|
|
keyPassword ""
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
}
|
|
|
|
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("packageRelease")) {
|
|
theTask.dependsOn "requestPasswords"
|
|
}
|
|
}
|