better gradle example

do not encourage users to put signingConfigs in .env
This commit is contained in:
Pedro Belo 2016-12-06 17:11:20 -08:00
parent a4ad07dace
commit 25c67fd0cf

View File

@ -40,13 +40,8 @@ public HttpURLConnection getApiClient() {
You can also read them from your Gradle configuration: You can also read them from your Gradle configuration:
```groovy ```groovy
signingConfigs { defaultConfig {
release { applicationId project.env.get("APP_ID")
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")
}
} }
``` ```
@ -58,6 +53,9 @@ And use them to configure libraries in `AndroidManifest.xml` and others:
android:value="@string/GOOGLE_MAPS_API_KEY" /> 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 ### iOS
Read variables declared in `.env` from your Obj-C classes like: Read variables declared in `.env` from your Obj-C classes like: