From a86d00493dacd32f51b588e02434cc66d1e43711 Mon Sep 17 00:00:00 2001
From: WX <42308734@qq.com>
Date: Sat, 16 Jul 2022 14:41:03 +0800
Subject: [PATCH] chore: update react-native0.66.4 to react-native0.69.1
---
HelloWorld/.flowconfig | 8 +-
HelloWorld/.gitattributes | 3 -
HelloWorld/.gitignore | 13 +-
HelloWorld/.prettierrc.js | 3 +-
HelloWorld/Gemfile | 6 +
HelloWorld/_bundle/config | 2 +
HelloWorld/_ruby-version | 1 +
.../android/app/src/debug/AndroidManifest.xml | 2 +-
.../com/helloworld/ReactNativeFlipper.java | 12 +-
.../android/app/src/main/AndroidManifest.xml | 9 +-
.../java/com/helloworld/MainActivity.java | 33 ++
.../java/com/helloworld/MainApplication.java | 13 +-
.../MainApplicationReactNativeHost.java | 116 ++++
.../components/MainComponentsRegistry.java | 36 ++
...ApplicationTurboModuleManagerDelegate.java | 48 ++
.../android/app/src/main/jni/Android.mk | 48 ++
.../jni/MainApplicationModuleProvider.cpp | 24 +
.../main/jni/MainApplicationModuleProvider.h | 16 +
...nApplicationTurboModuleManagerDelegate.cpp | 45 ++
...ainApplicationTurboModuleManagerDelegate.h | 38 ++
.../src/main/jni/MainComponentsRegistry.cpp | 61 ++
.../app/src/main/jni/MainComponentsRegistry.h | 32 ++
.../android/app/src/main/jni/OnLoad.cpp | 11 +
.../res/drawable/rn_edit_text_material.xml | 36 ++
.../app/src/main/res/values/strings.xml | 2 +-
.../app/src/main/res/values/styles.xml | 1 +
HelloWorld/android/build.gradle | 31 +-
HelloWorld/android/gradle.properties | 18 +-
.../android/gradle/wrapper/gradle-wrapper.jar | Bin 59203 -> 59536 bytes
.../gradle/wrapper/gradle-wrapper.properties | 2 +-
HelloWorld/android/gradlew | 257 +++++----
HelloWorld/android/gradlew.bat | 178 +++---
HelloWorld/android/settings.gradle | 8 +
.../ios/HelloWorld.xcodeproj/project.pbxproj | 165 +++---
HelloWorld/ios/HelloWorld/AppDelegate.m | 62 --
HelloWorld/ios/HelloWorld/AppDelegate.mm | 133 +++++
.../AppIcon.appiconset/Contents.json | 45 +-
.../HelloWorld/LaunchScreen copy.storyboard | 47 ++
HelloWorld/ios/HelloWorld/main.m | 3 +-
.../ios/HelloWorldTests/HelloWorldTests.m | 27 +-
HelloWorld/ios/Podfile | 11 +-
HelloWorld/ios/Podfile.lock | 543 +++++++++---------
HelloWorld/ios/_xcode.env | 11 +
HelloWorld/metro.config.js | 2 +-
HelloWorld/package.json | 8 +-
template/template/Gemfile | 6 +
template/template/_bundle/config | 2 +
template/template/_flowconfig | 8 +-
template/template/_gitattributes | 3 -
template/template/_gitignore | 13 +-
template/template/_prettierrc.js | 3 +-
template/template/_ruby-version | 1 +
.../android/app/src/debug/AndroidManifest.xml | 2 +-
.../com/helloworld/ReactNativeFlipper.java | 12 +-
.../android/app/src/main/AndroidManifest.xml | 9 +-
.../java/com/helloworld/MainActivity.java | 33 ++
.../java/com/helloworld/MainApplication.java | 13 +-
.../MainApplicationReactNativeHost.java | 116 ++++
.../components/MainComponentsRegistry.java | 36 ++
...ApplicationTurboModuleManagerDelegate.java | 48 ++
.../android/app/src/main/jni/Android.mk | 48 ++
.../jni/MainApplicationModuleProvider.cpp | 24 +
.../main/jni/MainApplicationModuleProvider.h | 16 +
...nApplicationTurboModuleManagerDelegate.cpp | 45 ++
...ainApplicationTurboModuleManagerDelegate.h | 38 ++
.../src/main/jni/MainComponentsRegistry.cpp | 61 ++
.../app/src/main/jni/MainComponentsRegistry.h | 32 ++
.../android/app/src/main/jni/OnLoad.cpp | 11 +
.../res/drawable/rn_edit_text_material.xml | 36 ++
.../app/src/main/res/values/strings.xml | 2 +-
.../app/src/main/res/values/styles.xml | 1 +
template/template/android/build.gradle | 31 +-
template/template/android/gradle.properties | 18 +-
.../android/gradle/wrapper/gradle-wrapper.jar | Bin 59203 -> 59536 bytes
.../gradle/wrapper/gradle-wrapper.properties | 2 +-
template/template/android/gradlew | 257 +++++----
template/template/android/settings.gradle | 8 +
.../ios/HelloWorld.xcodeproj/project.pbxproj | 165 +++---
.../template/ios/HelloWorld/AppDelegate.m | 62 --
.../template/ios/HelloWorld/AppDelegate.mm | 133 +++++
.../AppIcon.appiconset/Contents.json | 45 +-
.../HelloWorld/LaunchScreen copy.storyboard | 47 ++
template/template/ios/HelloWorld/main.m | 3 +-
.../ios/HelloWorldTests/HelloWorldTests.m | 27 +-
template/template/ios/Podfile | 11 +-
template/template/ios/Podfile.lock | 543 +++++++++---------
template/template/ios/_xcode.env | 11 +
template/template/metro.config.js | 2 +-
template/template/package.json | 8 +-
89 files changed, 2915 insertions(+), 1247 deletions(-)
delete mode 100644 HelloWorld/.gitattributes
create mode 100644 HelloWorld/Gemfile
create mode 100644 HelloWorld/_bundle/config
create mode 100644 HelloWorld/_ruby-version
create mode 100644 HelloWorld/android/app/src/main/java/com/helloworld/newarchitecture/MainApplicationReactNativeHost.java
create mode 100644 HelloWorld/android/app/src/main/java/com/helloworld/newarchitecture/components/MainComponentsRegistry.java
create mode 100644 HelloWorld/android/app/src/main/java/com/helloworld/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java
create mode 100644 HelloWorld/android/app/src/main/jni/Android.mk
create mode 100644 HelloWorld/android/app/src/main/jni/MainApplicationModuleProvider.cpp
create mode 100644 HelloWorld/android/app/src/main/jni/MainApplicationModuleProvider.h
create mode 100644 HelloWorld/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp
create mode 100644 HelloWorld/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h
create mode 100644 HelloWorld/android/app/src/main/jni/MainComponentsRegistry.cpp
create mode 100644 HelloWorld/android/app/src/main/jni/MainComponentsRegistry.h
create mode 100644 HelloWorld/android/app/src/main/jni/OnLoad.cpp
create mode 100644 HelloWorld/android/app/src/main/res/drawable/rn_edit_text_material.xml
delete mode 100644 HelloWorld/ios/HelloWorld/AppDelegate.m
create mode 100644 HelloWorld/ios/HelloWorld/AppDelegate.mm
create mode 100644 HelloWorld/ios/HelloWorld/LaunchScreen copy.storyboard
create mode 100644 HelloWorld/ios/_xcode.env
create mode 100644 template/template/Gemfile
create mode 100644 template/template/_bundle/config
delete mode 100644 template/template/_gitattributes
create mode 100644 template/template/_ruby-version
create mode 100644 template/template/android/app/src/main/java/com/helloworld/newarchitecture/MainApplicationReactNativeHost.java
create mode 100644 template/template/android/app/src/main/java/com/helloworld/newarchitecture/components/MainComponentsRegistry.java
create mode 100644 template/template/android/app/src/main/java/com/helloworld/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java
create mode 100644 template/template/android/app/src/main/jni/Android.mk
create mode 100644 template/template/android/app/src/main/jni/MainApplicationModuleProvider.cpp
create mode 100644 template/template/android/app/src/main/jni/MainApplicationModuleProvider.h
create mode 100644 template/template/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp
create mode 100644 template/template/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h
create mode 100644 template/template/android/app/src/main/jni/MainComponentsRegistry.cpp
create mode 100644 template/template/android/app/src/main/jni/MainComponentsRegistry.h
create mode 100644 template/template/android/app/src/main/jni/OnLoad.cpp
create mode 100644 template/template/android/app/src/main/res/drawable/rn_edit_text_material.xml
delete mode 100644 template/template/ios/HelloWorld/AppDelegate.m
create mode 100644 template/template/ios/HelloWorld/AppDelegate.mm
create mode 100644 template/template/ios/HelloWorld/LaunchScreen copy.storyboard
create mode 100644 template/template/ios/_xcode.env
diff --git a/HelloWorld/.flowconfig b/HelloWorld/.flowconfig
index 43dd26bc..74f3a75e 100644
--- a/HelloWorld/.flowconfig
+++ b/HelloWorld/.flowconfig
@@ -11,6 +11,8 @@ node_modules/react-native/Libraries/polyfills/.*
; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js
+.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
+
[untyped]
.*/node_modules/@react-native-community/cli/.*/.*
@@ -23,9 +25,6 @@ node_modules/react-native/flow/
[options]
emoji=true
-esproposal.optional_chaining=enable
-esproposal.nullish_coalescing=enable
-
exact_by_default=true
format.bracket_spacing=false
@@ -53,7 +52,6 @@ nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
unnecessary-invariant=warn
-signature-verification-failure=warn
[strict]
deprecated-type
@@ -65,4 +63,4 @@ untyped-import
untyped-type-import
[version]
-^0.158.0
+^0.176.3
diff --git a/HelloWorld/.gitattributes b/HelloWorld/.gitattributes
deleted file mode 100644
index 45a3dcb2..00000000
--- a/HelloWorld/.gitattributes
+++ /dev/null
@@ -1,3 +0,0 @@
-# Windows files should use crlf line endings
-# https://help.github.com/articles/dealing-with-line-endings/
-*.bat text eol=crlf
diff --git a/HelloWorld/.gitignore b/HelloWorld/.gitignore
index ecc1e4ad..344481b2 100644
--- a/HelloWorld/.gitignore
+++ b/HelloWorld/.gitignore
@@ -20,6 +20,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
+ios/.xcode.env.local
# Android/IntelliJ
#
@@ -49,12 +50,14 @@ buck-out/
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
-*/fastlane/report.xml
-*/fastlane/Preview.html
-*/fastlane/screenshots
+**/fastlane/report.xml
+**/fastlane/Preview.html
+**/fastlane/screenshots
+**/fastlane/test_output
# Bundle artifact
*.jsbundle
-# CocoaPods
-ios/Pods/
+# Ruby / CocoaPods
+/ios/Pods/
+/vendor/bundle/
diff --git a/HelloWorld/.prettierrc.js b/HelloWorld/.prettierrc.js
index 2c95e0c5..5f62afd3 100644
--- a/HelloWorld/.prettierrc.js
+++ b/HelloWorld/.prettierrc.js
@@ -1,6 +1,7 @@
module.exports = {
+ arrowParens: 'avoid',
+ bracketSameLine: true,
bracketSpacing: false,
- jsxBracketSameLine: true,
tabWidth: 2,
singleQuote: true,
trailingComma: 'all',
diff --git a/HelloWorld/Gemfile b/HelloWorld/Gemfile
new file mode 100644
index 00000000..5efda89f
--- /dev/null
+++ b/HelloWorld/Gemfile
@@ -0,0 +1,6 @@
+source 'https://rubygems.org'
+
+# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
+ruby '2.7.5'
+
+gem 'cocoapods', '~> 1.11', '>= 1.11.2'
diff --git a/HelloWorld/_bundle/config b/HelloWorld/_bundle/config
new file mode 100644
index 00000000..848943bb
--- /dev/null
+++ b/HelloWorld/_bundle/config
@@ -0,0 +1,2 @@
+BUNDLE_PATH: "vendor/bundle"
+BUNDLE_FORCE_RUBY_PLATFORM: 1
diff --git a/HelloWorld/_ruby-version b/HelloWorld/_ruby-version
new file mode 100644
index 00000000..a603bb50
--- /dev/null
+++ b/HelloWorld/_ruby-version
@@ -0,0 +1 @@
+2.7.5
diff --git a/HelloWorld/android/app/src/debug/AndroidManifest.xml b/HelloWorld/android/app/src/debug/AndroidManifest.xml
index b2f3ad9f..4b185bc1 100644
--- a/HelloWorld/android/app/src/debug/AndroidManifest.xml
+++ b/HelloWorld/android/app/src/debug/AndroidManifest.xml
@@ -8,6 +8,6 @@
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
-
This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.helloworld;
-
import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
import com.facebook.flipper.android.utils.FlipperUtils;
@@ -19,22 +18,20 @@
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
+import com.facebook.react.ReactInstanceEventListener;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.network.NetworkingModule;
import okhttp3.OkHttpClient;
-
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);
-
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
client.addPlugin(new ReactFlipperPlugin());
client.addPlugin(new DatabasesFlipperPlugin(context));
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
client.addPlugin(CrashReporterPlugin.getInstance());
-
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
NetworkingModule.setCustomClientBuilder(
new NetworkingModule.CustomClientBuilder() {
@@ -45,13 +42,12 @@ public void apply(OkHttpClient.Builder builder) {
});
client.addPlugin(networkFlipperPlugin);
client.start();
-
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
// Hence we run if after all native modules have been initialized
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext == null) {
reactInstanceManager.addReactInstanceEventListener(
- new ReactInstanceManager.ReactInstanceEventListener() {
+ new ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext reactContext) {
reactInstanceManager.removeReactInstanceEventListener(this);
@@ -69,4 +65,4 @@ public void run() {
}
}
}
-}
+}
\ No newline at end of file
diff --git a/HelloWorld/android/app/src/main/AndroidManifest.xml b/HelloWorld/android/app/src/main/AndroidManifest.xml
index 1cae0aad..7ba57ca1 100644
--- a/HelloWorld/android/app/src/main/AndroidManifest.xml
+++ b/HelloWorld/android/app/src/main/AndroidManifest.xml
@@ -9,15 +9,14 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
- android:theme="@style/AppTheme"
- android:usesCleartextTraffic="true"
- >
+ android:theme="@style/AppTheme">
Please note that this class is used ONLY if you opt-in for the New Architecture (see the
+ * `newArchEnabled` property). Is ignored otherwise.
+ */
+public class MainApplicationReactNativeHost extends ReactNativeHost {
+ public MainApplicationReactNativeHost(Application application) {
+ super(application);
+ }
+
+ @Override
+ public boolean getUseDeveloperSupport() {
+ return BuildConfig.DEBUG;
+ }
+
+ @Override
+ protected List Please note that this class is used ONLY if you opt-in for the New Architecture (see the
+ * `newArchEnabled` property). Is ignored otherwise.
+ */
+@DoNotStrip
+public class MainComponentsRegistry {
+ static {
+ SoLoader.loadLibrary("fabricjni");
+ }
+
+ @DoNotStrip private final HybridData mHybridData;
+
+ @DoNotStrip
+ private native HybridData initHybrid(ComponentFactory componentFactory);
+
+ @DoNotStrip
+ private MainComponentsRegistry(ComponentFactory componentFactory) {
+ mHybridData = initHybrid(componentFactory);
+ }
+
+ @DoNotStrip
+ public static MainComponentsRegistry register(ComponentFactory componentFactory) {
+ return new MainComponentsRegistry(componentFactory);
+ }
+}
diff --git a/HelloWorld/android/app/src/main/java/com/helloworld/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java b/HelloWorld/android/app/src/main/java/com/helloworld/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java
new file mode 100644
index 00000000..8593b3bb
--- /dev/null
+++ b/HelloWorld/android/app/src/main/java/com/helloworld/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java
@@ -0,0 +1,48 @@
+package com.helloworld.newarchitecture.modules;
+
+import com.facebook.jni.HybridData;
+import com.facebook.react.ReactPackage;
+import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
+import com.facebook.react.bridge.ReactApplicationContext;
+import com.facebook.soloader.SoLoader;
+import java.util.List;
+
+/**
+ * Class responsible to load the TurboModules. This class has native methods and needs a
+ * corresponding C++ implementation/header file to work correctly (already placed inside the jni/
+ * folder for you).
+ *
+ * Please note that this class is used ONLY if you opt-in for the New Architecture (see the
+ * `newArchEnabled` property). Is ignored otherwise.
+ */
+public class MainApplicationTurboModuleManagerDelegate
+ extends ReactPackageTurboModuleManagerDelegate {
+
+ private static volatile boolean sIsSoLibraryLoaded;
+
+ protected MainApplicationTurboModuleManagerDelegate(
+ ReactApplicationContext reactApplicationContext, List syE_V_3M&trw$P=ezkHosV$8&I5c0(*-9KBE5DJOC-Xv
zw dQs=^
z@xwZQU)~;p1L*~ciC}9ao{nQ-@B>r s&&O3h=OLiCz&(|f0
zxWU_-JZy>hxP*gvR>CLnNeQ1~g;6{g#-}AbkIzWR;j=8=6!AHpKQCbjFYxf9h%bov
zVi;eNa1>t-<14KERUW>^KwoF+8zNo`4
zYYc!v@NU%|U;_sM`2z(4BAilWijmR>4U^KdN)D8%@2KLcqkTDW%^3U(Wg>{qkAF
z&RcYr;D1I5aD(N-PnqoEeBN~JyXiT(+@b`4Pv`;KmkBXYN48@0;iXuq6!ytn`vGp$
z6X4DQHMx^WlOek^bde&~cvEO@K$oJ}i`T`N;M|lX0mhmEHPrXXW>6X}+73IoMsu2?uuK3lT>;W
EGPXy}XK_&x597
zt(o6ArN8vZX0?~(lFGHRtHP{gO0y^$iU6Xt2e&v&ugLxfsl;GD)nf~3R^ACqSFLQ<
zV7`cXgry((wDMJB55a6