Giter VIP home page Giter VIP logo

Comments (1)

maksimlya avatar maksimlya commented on August 10, 2024 1

We are currently on react 0.73.5, and have no issues with this lib on android and product flavors. The setup is something like that:

In app/build.gradle flavors defined regular:

productFlavors {
    DemoFlavor1 {
        applicationId "com.zzzzz.yyyyy"
        dimension "default"
        resValue "string", "app_name", "DemoFlavor1"
        versionCode 22222
        versionName "0.1.56"
    }
    DemoFlavor2 {
        applicationId "com.ccccc.vvvvv"
        dimension "default"
        resValue "string", "app_name", "DemoFlavor2"
        versionCode 33333
        versionName "0.2.54"
    }
}


implementation project(':react-native-config')

And down in that file:

project.ext.envConfigFiles = [
        "demoFlavor1debug":"../config/.env.DemoFlavor1",
        "demoFlavor1release":"../config/.env.DemoFlavor1",
        "demoFlavor2debug":"../config/.env.DemoFlavor2",
        "demoFlavor2release": "../config/.env.DemoFlavor2"
]
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"

In settings.gradle:

include ':react-native-config'
project(':react-native-config').projectDir = new File(settingsDir, '../node_modules/react-native-config/android')

On iOS tho.... It is a pain and suffering due to caching mechanisms.

from react-native-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.