So I\'m trying to convert all of my ant build scripts to gradle, and I\'ve been able to find ample resources and documentation on all of it except how to configure signing in th
Inspired by Eugens solution i came up with a little shorter variance. The code has to be in the android {} task configuration.
File signFile = rootProject.file('sign.properties')
if (signFile.exists()) {
Properties p = new Properties()
p.load(new FileInputStream(signFile))
signingConfigs {
releaseConfig {
storeFile file(p.storeFile)
storePassword p.storePassword
keyAlias p.keyAlias
keyPassword p.keyPassword
}
}
buildTypes.release.signingConfig signingConfigs.releaseConfig
}