From a7cde8045ba10d67896cc5b203d397eaf4f395d6 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Tue, 29 Mar 2016 07:38:46 -0700 Subject: [PATCH] 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 --- local-cli/generator-android/templates/src/app/build.gradle | 4 ++-- package.json | 1 + .../templates/src/app/react.gradle => react.gradle | 0 3 files changed, 3 insertions(+), 2 deletions(-) rename local-cli/generator-android/templates/src/app/react.gradle => react.gradle (100%) diff --git a/local-cli/generator-android/templates/src/app/build.gradle b/local-cli/generator-android/templates/src/app/build.gradle index 428bb043d..bad655e7e 100644 --- a/local-cli/generator-android/templates/src/app/build.gradle +++ b/local-cli/generator-android/templates/src/app/build.gradle @@ -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: diff --git a/package.json b/package.json index 107a52a03..fc3a5315c 100644 --- a/package.json +++ b/package.json @@ -102,6 +102,7 @@ "React", "React.podspec", "ReactAndroid", + "react.gradle", "android", "Libraries", "packager", diff --git a/local-cli/generator-android/templates/src/app/react.gradle b/react.gradle similarity index 100% rename from local-cli/generator-android/templates/src/app/react.gradle rename to react.gradle