react-native-macos/template
Maksym Rusynyk a0d8740878 Android template: Allow overriding default "index.js" entry file (#26769)
Summary:
- Using "System.getenv" allows to specify any entry file using environment variables and without modifying gradle file. Example:

    export ENTRY_FILE="another_entry_file.js"
    ./gradlew assembleDebug

- This functionality is also more align with iOS implementation that uses 'if [[ "$ENTRY_FILE" ]]; then'. See https://github.com/facebook/react-native/pull/23667 for more details.

- Possibility to define entry file on CI without modifying sources (Example: project like [pixels-catcher](https://www.npmjs.com/package/pixels-catcher) requires different entry file)

## Changelog:

[Android] [Added]  - Custom entry file on android using `ENTRY_FILE` environment variable
Pull Request resolved: https://github.com/facebook/react-native/pull/26769

Test Plan:
- Create a project from template

- Define `ENTRY_FILE` environment variable

```
export ENTRY_FILE="anotherIndexFile.js"
```

- Build android

```
./gradlew assembleDebug
```

Expected result: App contains bundle file that starts from `anotherIndexFile.js` file.

Differential Revision: D17903165

Pulled By: cpojer

fbshipit-source-id: 6b7cdf229918d101c170aa5fbdca6f3ef293d41c
2019-10-13 23:41:15 -07:00
..
__tests__ Exclude RN templates from internal linters 2019-02-11 15:42:17 -08:00
android Android template: Allow overriding default "index.js" entry file (#26769) 2019-10-13 23:41:15 -07:00
ios Fix template whitespace error (#26631) 2019-09-29 18:03:35 -07:00
App.js Manual fixes for xplat/js/react-native-github 2019-08-09 10:11:15 -07:00
_buckconfig Move react-native template 2018-12-07 07:49:19 -08:00
_eslintrc.js Add .eslintrc to RN project template (#23901) 2019-03-21 07:14:23 -07:00
_flowconfig v0.109.0 in xplat 2019-10-04 16:42:08 -07:00
_gitattributes Move react-native template 2018-12-07 07:49:19 -08:00
_gitignore Adding the debug.keystore file back (#25807) 2019-07-25 15:09:25 -07:00
_prettierrc.js Fresh RN projects fails ESLint / Prettier by default (#25478) 2019-07-15 02:09:59 -07:00
_watchmanconfig Move react-native template 2018-12-07 07:49:19 -08:00
app.json Move react-native template 2018-12-07 07:49:19 -08:00
babel.config.js fix: change template to work with jest (#23150) 2019-01-24 17:33:50 -08:00
index.js Exclude RN templates from internal linters 2019-02-11 15:42:17 -08:00
metro.config.js Exclude RN templates from internal linters 2019-02-11 15:42:17 -08:00
package.json Upgrade all dependencies in package.json template (#26563) 2019-09-25 22:03:45 -07:00