Comments (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)
- How to import NSExceptionDomains as an environment variable?
- Variable are UNDEFINED on IOS HOT 14
- Could not find method android() for arguments [dotenv_4bgzrl46y7i0xnvnmgzr6qa4c$_run_closure1@3fa75e8b] on project ':app' of type org.gradle.api.Project.
- How to read config in Kotlin class in react native 0.73? HOT 1
- RNConfig Empty Android HOT 2
- MainApplication.kt:27:58 Type mismatch: inferred type is String but Boolean was expected HOT 1
- Not working on ReactNative 0.73 HOT 1
- Error retrieving namespace value from .env file during build process
- hey, did you find a way to make it work?
- Update the documentation HOT 3
- Issue with kotlin DSL
- ios undefined problem HOT 5
- [Question] - Is this lib abandoned?
- Visionos podspec misconfiguration resulting in build failure HOT 2
- App crashes on launch when using in `GoogleService-Info.plist` on iOS
- App crashes on android release build HOT 2
- [Question] Windows: Package.appxmanifest
- Build error on iOS app with react-native 0.73.6
- Update example react-native version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-config.