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
Gradle 1.9 doesn't allow you to define properties. You can add them only to ext now. Small addition to previous answers:
signingConfigs {
debug {
project.ext.loadSign = false
}
release {
project.ext.loadSign = true
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.release
}
}
if ( project.ext.loadSign ) {
Properties p = new Properties ()
p.load ( new FileInputStream ( rootProject.file ( 'keys/sign.properties' ) ) )
android.signingConfigs.release.storeFile file ( p.file )
android.signingConfigs.release.storePassword p.password
android.signingConfigs.release.keyAlias p.alias
android.signingConfigs.release.keyPassword p.keyPassword
}