mirror of
https://github.com/status-im/react-native-config.git
synced 2025-02-24 04:48:16 +00:00
better gradle example
do not encourage users to put signingConfigs in .env
This commit is contained in:
parent
a4ad07dace
commit
25c67fd0cf
12
README.md
12
README.md
@ -40,13 +40,8 @@ public HttpURLConnection getApiClient() {
|
||||
You can also read them from your Gradle configuration:
|
||||
|
||||
```groovy
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(project.env.get("RELEASE_STORE_FILE"))
|
||||
storePassword project.env.get("RELEASE_STORE_PASSWORD")
|
||||
keyAlias project.env.get("RELEASE_KEY_ALIAS")
|
||||
keyPassword project.env.get("RELEASE_KEY_PASSWORD")
|
||||
}
|
||||
defaultConfig {
|
||||
applicationId project.env.get("APP_ID")
|
||||
}
|
||||
```
|
||||
|
||||
@ -58,6 +53,9 @@ And use them to configure libraries in `AndroidManifest.xml` and others:
|
||||
android:value="@string/GOOGLE_MAPS_API_KEY" />
|
||||
```
|
||||
|
||||
Once again keep in mind variables stored in `.env` are published with your code, so do not put anything sensitive there like your app `signingConfigs`.
|
||||
|
||||
|
||||
### iOS
|
||||
|
||||
Read variables declared in `.env` from your Obj-C classes like:
|
||||
|
Loading…
x
Reference in New Issue
Block a user