Skip to content

Commit

Permalink
Update to react-native 0.64 and enable Hermes
Browse files Browse the repository at this point in the history
Summary:
allow-large-files

Per title. hermes enabled so that we can verify the hermes debugger works.

Reviewed By: passy

Differential Revision: D27229331

fbshipit-source-id: c2e45151b9d2097edc7e79f54eb89f9d110899d6
  • Loading branch information
mweststrate authored and facebook-github-bot committed Mar 22, 2021
1 parent ea0cc7f commit e1b12bb
Show file tree
Hide file tree
Showing 14 changed files with 1,000 additions and 1,506 deletions.
4 changes: 3 additions & 1 deletion react-native/ReactNativeFlipperExample/.flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ emoji=true
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

exact_by_default=true

module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js
Expand Down Expand Up @@ -71,4 +73,4 @@ untyped-import
untyped-type-import

[version]
^0.113.0
^0.137.0
5 changes: 0 additions & 5 deletions react-native/ReactNativeFlipperExample/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ const App: () => React$Node = () => {
contentInsetAdjustmentBehavior="automatic"
style={styles.scrollView}>
<Header />
{global.HermesInternal == null ? null : (
<View style={styles.engine}>
<Text style={styles.footer}>Engine: Hermes</Text>
</View>
)}
<View style={styles.body}>
<View style={styles.sectionContainer}>
<FlipperTicTacToe />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ import com.android.build.OutputFile
*/

project.ext.react = [
enableHermes: false, // clean and rebuild if changing
enableHermes: true, // clean and rebuild if changing
]

apply from: "../../node_modules/react-native/react.gradle"
Expand Down Expand Up @@ -128,6 +128,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
def enableHermes = project.ext.react.get("enableHermes", false);

android {
ndkVersion rootProject.ext.ndkVersion

compileSdkVersion rootProject.ext.compileSdkVersion

compileOptions {
Expand Down Expand Up @@ -180,7 +182,7 @@ android {
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.INTERNET" />

<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
7 changes: 4 additions & 3 deletions react-native/ReactNativeFlipperExample/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@

buildscript {
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 16
buildToolsVersion = "29.0.3"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
ndkVersion = "20.1.5948944"
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.3")
classpath("com.android.tools.build:gradle:4.1.0")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
14 changes: 4 additions & 10 deletions react-native/ReactNativeFlipperExample/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ platform :ios, '10.0'

target 'ReactNativeFlipperExample' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
use_react_native!(
:path => config["reactNativePath"],
:hermes_enabled => true
)

target 'ReactNativeFlipperExampleTests' do
inherit! :complete
Expand All @@ -21,12 +24,3 @@ target 'ReactNativeFlipperExample' do
flipper_post_install(installer)
end
end

target 'ReactNativeFlipperExample-tvOS' do
# Pods for ReactNativeFlipperExample-tvOS

target 'ReactNativeFlipperExample-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end

0 comments on commit e1b12bb

Please sign in to comment.