Skip to content

Commit

Permalink
android build: Omit entryFile, now that we can.
Browse files Browse the repository at this point in the history
Part of the RN v0.61 -> v0.62 changes to the template app [1],
corresponding to facebook/react-native@a0d874087. This must happen
at or after the main upgrade commit because the field is newly
optional at the new version.

There isn't a clear functional advantage to doing it this way. In
fact, the maintainer who merged it said he was "not a big fan" of
the change [2]. But he merged it anyway, on the grounds that it
makes the experience more consistent with iOS.

So, I suppose it does that for us, too, and in any case we're now
more consistent with the template app.

[1] https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.62.2
[2] facebook/react-native#26769 (review)
  • Loading branch information
chrisbobbe committed Sep 2, 2020
1 parent 504d83d commit 24bec42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ import com.android.build.OutputFile
* // the name of the generated asset file containing your JS bundle
* bundleAssetName: "index.android.bundle",
*
* // the entry file for bundle generation
* // the entry file for bundle generation. If none specified and
* // "index.android.js" exists, it will be used. Otherwise "index.js" is
* // default. Can be overridden with ENTRY_FILE environment variable.
* entryFile: "index.android.js",
*
* // https://reactnative.dev/docs/ram-bundles-inline-requires#enable-the-ram-format
Expand Down Expand Up @@ -80,7 +82,6 @@ import com.android.build.OutputFile
*/

project.ext.react = [
entryFile : "index.js",
enableHermes : false, // clean and rebuild if changing
// quasi-unstable: see commits 8f8a266af and 833d083a9
jsBundleDirRelease: "$buildDir/intermediates/merged_assets/release/out"
Expand Down

0 comments on commit 24bec42

Please sign in to comment.