Add following to your build.gradle :
android {
defaultConfig {}
signingConfigs { release { storeFile file("<path-to-signing-keys>/signingKeys.jks") storePassword "your store password" keyAlias "your chosen alias" keyPassword "password" }
}You can also publish to playtore by adding following configuration to your build.gradle:play { serviceAccountEmail = 'serviceAccount@gmail.com' pk12File = file('key.p12') track = 'alpha'}