I´m trying to sign my app with the gradle build file. When I use the plain signingConfigs it works (signingConfigs.release)! But If I´m trying to read the properties from the properties-file it won´t work. (signingConfigs.config)
Properties props = new Properties();
props.load(new FileInputStream(file(rootProject.file("signing.properties"))))
android {
signingConfigs {
config {
storeFile file(props["storeFile"])
storePassword props["storePassword"]
keyAlias props["keyAlias"]
keyPassword props["KeyPassword"]
}
release {
storeFile file("..\\xyz.jks")
storePassword "****"
keyAlias "****"
keyPassword "****"
}
}
.
.
.
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.release
}
debug {
applicationIdSuffix '.debug'
versionNameSuffix '-SNAPSHOT'
}
}
Properties file:
storeFile=xyz.jks
storePassword=xyz
keyAlias=xyz
keyPassword=xyz
When I run the project, android studios show a dialog which says:
xyz.apk is not signed. Please configure the signing information for the selected flavor using the Project Structure dialog.
The property file is read correctly because I can log some properties from the file throw the console.
Some of my system details:
Android Studio 0.8.6 Windows 8.1 x64 gradle 1.12
Hope anyone can help me. If you want to know more details, then ask me.