Apply react.gradle from node_modules/react-native

Summary:The goal is to minimize the number of files we need to bootstrap. This allows us to make the upgrade process smoother for everyone.

If someone needs to customize the file, we already provide some config options. The ability to copy the file and modify it is always there for those few who need it.

**Test plan**

Generate a new project with the updated template.  The app should build and run fine both in debug and production mode.

Related #6292
Closes https://github.com/facebook/react-native/pull/6610

Differential Revision: D3109099

Pulled By: foghina

fb-gh-sync-id: 13fc89e60daed30bf6349e532a140c1b6f8f053a
fbshipit-source-id: 13fc89e60daed30bf6349e532a140c1b6f8f053a
This commit is contained in:
Satyajit Sahoo 2016-03-29 07:38:46 -07:00 committed by Facebook Github Bot 9
parent bc54a45542
commit a7cde8045b
3 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,7 @@ import com.android.build.OutputFile
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development server. Below you can see all the possible configurations
* and their defaults. If you decide to add a configuration block, make sure to add it before the
* `apply from: "react.gradle"` line.
* `apply from: "../../node_modules/react-native/react.gradle"` line.
*
* project.ext.react = [
* // the name of the generated asset file containing your JS bundle
@ -59,7 +59,7 @@ import com.android.build.OutputFile
* ]
*/
apply from: "react.gradle"
apply from: "../../node_modules/react-native/react.gradle"
/**
* Set this to true to create two separate APKs instead of one:

View File

@ -102,6 +102,7 @@
"React",
"React.podspec",
"ReactAndroid",
"react.gradle",
"android",
"Libraries",
"packager",