You can define the signing configuration to sign the apk in the build.gradle
file.
You can define:
storeFile
: the keystore filestorePassword
: the keystore passwordkeyAlias
: a key alias namekeyPassword
: A key alias passwordYou have to define the signingConfigs
block to create a signing configuration:
android {
signingConfigs {
myConfig {
storeFile file("myFile.keystore")
storePassword "myPasswork"
keyAlias "aKeyAlias"
keyPassword "myAliasPassword"
}
}
//....
}
Then you can assign it to one or more build types.
android {
buildTypes {
release {
signingConfig signingConfigs.myConfig
}
}
}