simpleweb / romulus-cli

Brings structure to your React Native apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android Configuration for Staging

craigcoles opened this issue · comments

Describe the issue

When doing a build for staging, some additional configuration is needed if you want to build staging in release mode.

Steps to reproduce

  1. cd android/ && ./gradlew assembleStaging.
  2. See the error in the console.

Solution

project.ext.react = [
    entryFile: "index.js",
    bundleInStaging: true,
    devDisabledInStaging: true
]

android {
    signingConfigs {
        release {
            if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
                ...
            }
        }
    }
    buildTypes {
        staging {
            signingConfig signingConfigs.release
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            matchingFallbacks = ['release']
        }
    }
}