I am trying to setup signing process so that keystore password and key password are not stored in the project's build.gradle
file.
Currently I have the following in the build.gradle
:
android {
...
signingConfigs {
release {
storeFile file("my.keystore")
storePassword "store_password"
keyAlias "my_key_alias"
keyPassword "key_password"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
It works perfectly fine but I must not put the values for the storePassword
, and keyPassword
in my repository. I would prefer to not put storeFile
and keyAlias
there either.
Is there a way to alter the build.gradle
so that it will obtain passwords from some external source (like a file that resides on my computer only)?
And of course, the altered build.gradle
should be usable on any other computer (even if the computer doesn't have access to passwords).
I am using Android Studio and in Mac OS X Maverics if it does matter.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…