How to Release App

1

I finished my app now leave it ready for the Play Store I saw on the site that I have to configure Gradle, add the release code.

I got this code and still did not understand how to use it.

release {
      storeFile file(RELEASE_STORE_FILE)
      storePassword RELEASE_STORE_PASSWORD
      keyAlias RELEASE_KEY_ALIAS
      keyPassword RELEASE_KEY_PASSWORD
    }
    
asked by anonymous 04.01.2017 / 04:08

2 answers

2

You need to generate the release.store. After watering, you will configure it in Generate Signer APK.

And put the data you use in Generate Signer APK in your gradient.

link

link

    
04.01.2017 / 18:00
1

In the file build.gradle (Module:app) add the following code:

android {
    signingConfigs {
        config {
            keyAlias KEY_ALIAS
            keyPassword KEY_PASSWORD
            storeFile file(STORE_FILE)
            storePassword STORE_PASSWORD
        }
    }
....
}

This contains the information for signing the apk. This information is stored in the file grade.properties :

STORE_FILE=../SEU_AQUIVO_DE_ASSINATURA.keystore
STORE_PASSWORD=SUA SENHA 
KEY_ALIAS=SEU ALIAS
KEY_PASSWORD=SUA SENHA DO ALIAS

In this case, we leave SEU_AQUIVO_DE_ASSINATURA in the project root (next to the app folder).

Now let's say that we will use this signature in build ( signingConfig signingConfigs.config ):

buildTypes {
// Release
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.config
    }
//Debug
    debug {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.config
    }
}
    
04.01.2017 / 18:11