Warning:
  Keep the key.properties file private;
  don’t check it into public source control.

Configure signing in gradle

Configure gradle to use your upload key when building your app in release mode 
by editing the [project]/android/app/build.gradle file.

Add the keystore information from your properties file before the android block:

    
   def keystoreProperties = new Properties()
   def keystorePropertiesFile = rootProject.file('key.properties')
   if (keystorePropertiesFile.exists()) {
       keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
   }

   android {
         ...
   }
    

    Load the key.properties file into the keystoreProperties object.

Find the buildTypes block: