Skip to content

Commit e537701

Browse files
Add recipe to update React Native version. (#45)
Update ReactNative to 0.77. Enable New architecture.
1 parent 6ebec60 commit e537701

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3021
-2466
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.vscode
22
google-services.json
33
/.vscode
4+
update_storage/
5+
rn_files.txt
46

57
# OSX
68
#

.htfiles

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
android/app/src/main/AndroidManifest.xml
2+
ios/QuickstartReactNative/Info.plist
3+
src/App.tsx
4+
.eslintrc.js
5+
.prettierrc.js
6+
.yarnrc.yml
7+
app.json
8+
README.md
9+
.nvmrc
10+
android/app/google-services.json
11+
index.native.js
12+
src/index.web.js

.htfiles_manual

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
android/app/build.gradle
2+
android/build.gradle
3+
android/gradle.properties
4+
ios/Podfile
5+
package.json

Gemfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby ">= 2.6.10"
55

6-
gem 'cocoapods', '~> 1.12'
6+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
7+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9+
gem 'xcodeproj', '< 1.26.0'
10+
gem 'concurrent-ruby', '< 1.3.4'

Gemfile.lock

Lines changed: 0 additions & 100 deletions
This file was deleted.

__tests__/App.test.tsx

Lines changed: 0 additions & 17 deletions
This file was deleted.

android/app/build.gradle

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
23
apply plugin: "com.facebook.react"
34
apply plugin: "com.google.gms.google-services"
45

@@ -8,14 +9,14 @@ apply plugin: "com.google.gms.google-services"
89
*/
910
react {
1011
/* Folders */
11-
// The root of your project, i.e. where "package.json" lives. Default is '..'
12-
// root = file("../")
13-
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
14-
// reactNativeDir = file("../node_modules/react-native")
15-
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
16-
// codegenDir = file("../node_modules/@react-native/codegen")
17-
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
18-
// cliFile = file("../node_modules/react-native/cli.js")
12+
// The root of your project, i.e. where "package.json" lives. Default is '../..'
13+
// root = file("../../")
14+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
15+
// reactNativeDir = file("../../node_modules/react-native")
16+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
17+
// codegenDir = file("../../node_modules/@react-native/codegen")
18+
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
19+
// cliFile = file("../../node_modules/react-native/cli.js")
1920

2021
/* Variants */
2122
// The list of variants to that are debuggable. For those we're going to
@@ -49,6 +50,9 @@ react {
4950
//
5051
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5152
// hermesFlags = ["-O", "-output-source-map"]
53+
54+
/* Autolinking */
55+
autolinkLibrariesWithApp()
5256
}
5357

5458
/**
@@ -71,10 +75,12 @@ def jscFlavor = 'org.webkit:android-jsc:+'
7175

7276
android {
7377
ndkVersion rootProject.ext.ndkVersion
78+
buildToolsVersion rootProject.ext.buildToolsVersion
79+
compileSdk rootProject.ext.compileSdkVersion
7480

75-
compileSdkVersion rootProject.ext.compileSdkVersion
81+
// we don't use variable because React Native parses this value on build
82+
namespace "com.quickstartreactnative"
7683

77-
namespace "com.hypertrack.quickstart.reactnative.android"
7884
defaultConfig {
7985
applicationId "com.hypertrack.quickstart.reactnative.android"
8086
minSdkVersion rootProject.ext.minSdkVersion
@@ -114,17 +120,9 @@ dependencies {
114120
// The version of react-native is set by the React Native Gradle Plugin
115121
implementation("com.facebook.react:react-android")
116122

117-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
118-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
119-
exclude group:'com.squareup.okhttp3', module:'okhttp'
120-
}
121-
122-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
123123
if (hermesEnabled.toBoolean()) {
124124
implementation("com.facebook.react:hermes-android")
125125
} else {
126126
implementation jscFlavor
127127
}
128128
}
129-
130-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools">
44

5-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6-
75
<application
86
android:usesCleartextTraffic="true"
97
tools:targetApi="28"
10-
tools:ignore="GoogleAppIndexingWarning">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12-
</application>
8+
tools:ignore="GoogleAppIndexingWarning"/>
139
</manifest>

android/app/src/debug/java/com/quickstartreactnative/ReactNativeFlipper.java

Lines changed: 0 additions & 75 deletions
This file was deleted.

android/app/src/main/AndroidManifest.xml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,25 @@
33
<uses-permission android:name="android.permission.INTERNET" />
44

55
<application
6-
android:name=".MainApplication"
6+
android:name=".MainApplication"
7+
android:label="@string/app_name"
8+
android:icon="@mipmap/ic_launcher"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:allowBackup="false"
11+
android:theme="@style/AppTheme"
12+
android:supportsRtl="true">
13+
<activity
14+
android:name=".MainActivity"
715
android:label="@string/app_name"
8-
android:icon="@mipmap/ic_launcher"
9-
android:roundIcon="@mipmap/ic_launcher_round"
10-
android:allowBackup="false"
11-
android:theme="@style/AppTheme">
12-
<activity
13-
android:name=".MainActivity"
14-
android:label="@string/app_name"
15-
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
16-
android:launchMode="singleTask"
17-
android:windowSoftInputMode="adjustResize"
18-
android:exported="true">
19-
<intent-filter>
20-
<action android:name="android.intent.action.MAIN" />
21-
<category android:name="android.intent.category.LAUNCHER" />
22-
</intent-filter>
23-
</activity>
16+
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
17+
android:launchMode="singleTask"
18+
android:windowSoftInputMode="adjustResize"
19+
android:exported="true">
20+
<intent-filter>
21+
<action android:name="android.intent.action.MAIN" />
22+
<category android:name="android.intent.category.LAUNCHER" />
23+
</intent-filter>
24+
</activity>
2425

2526
<meta-data
2627
android:name="HyperTrackPublishableKey"

android/app/src/main/java/com/quickstartreactnative/MainActivity.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)