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
This is a reply to user672009 and addition to sdqali's post (his code will crash on building debug version by IDE's "Run" button):
You can use the following code:
final Console console = System.console();
if (console != null) {
// Building from console
signingConfigs {
release {
storeFile file(console.readLine("Enter keystore path: "))
storePassword console.readLine("Enter keystore password: ")
keyAlias console.readLine("Enter alias key: ")
keyPassword console.readLine("Enter key password: ")
}
}
} else {
// Building from IDE's "Run" button
signingConfigs {
release {
}
}
}