I would like to have my Gradle build to create a release signed apk file using Gradle.
I\'m not sure if the code is correct or if I\'m missing a parameter when doing
android {
compileSdkVersion 17
buildToolsVersion "19.0.3"
defaultConfig {
minSdkVersion 9
targetSdkVersion 18
}
File signFile = rootProject.file('sign/keystore.properties')
if (signFile.exists()) {
Properties properties = new Properties()
properties.load(new FileInputStream(signFile))
signingConfigs {
release {
storeFile rootProject.file(properties['keystore'])
storePassword properties['storePassword']
keyAlias properties['keyAlias']
keyPassword properties['keyPassword']
}
}
}
buildTypes {
release {
runProguard true
zipAlign true
proguardFile rootProject.file('proguard-rules.cfg')
signingConfig signingConfigs.release
}
debug {
runProguard false
zipAlign true
}
}
}