Skip to content

Commit 9c0cf28

Browse files
wwmmzzwangmengzhen
andauthored
feat: Upgrade react-native to v0.66.1 (#187)
* fix(deps): update dependency react-native to v0.66.1 * fix(deps): update dependency react-native to v0.66.1 * fix(deps): update dependency react-native to v0.66.1 Co-authored-by: wangmengzhen <wangmengzhen@nihaosi.com>
1 parent 91f6770 commit 9c0cf28

File tree

28 files changed

+751
-629
lines changed

28 files changed

+751
-629
lines changed

HelloWorld/.flowconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ esproposal.nullish_coalescing=enable
2828

2929
exact_by_default=true
3030

31+
format.bracket_spacing=false
32+
3133
module.file_ext=.js
3234
module.file_ext=.json
3335
module.file_ext=.ios.js
@@ -63,4 +65,4 @@ untyped-import
6365
untyped-type-import
6466

6567
[version]
66-
^0.137.0
68+
^0.158.0

HelloWorld/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ build/
2828
.gradle
2929
local.properties
3030
*.iml
31+
*.hprof
3132

3233
# node.js
3334
#

HelloWorld/android/app/build.gradle

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,12 @@ def jscFlavor = 'org.webkit:android-jsc:+'
118118
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
119119
* and the benefits of using Hermes will therefore be sharply reduced.
120120
*/
121-
def enableHermes = project.ext.react.get("enableHermes", false);
121+
def enableHermes = project.ext.react.get("enableHermes", true);
122+
123+
/**
124+
* Architectures to build native code for in debug.
125+
*/
126+
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")
122127

123128
android {
124129
ndkVersion rootProject.ext.ndkVersion
@@ -151,6 +156,11 @@ android {
151156
buildTypes {
152157
debug {
153158
signingConfig signingConfigs.debug
159+
if (nativeArchitectures) {
160+
ndk {
161+
abiFilters nativeArchitectures.split(',')
162+
}
163+
}
154164
}
155165
release {
156166
// Caution! In production, you need to generate your own keystore file.
@@ -181,7 +191,7 @@ android {
181191
dependencies {
182192
implementation fileTree(dir: "libs", include: ["*.jar"])
183193
//noinspection GradleDynamicVersion
184-
implementation "com.facebook.react:react-native:+" // From node_modules
194+
implementation 'com.facebook.react:react-native:0.20.1' // From node_modules
185195

186196
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
187197

HelloWorld/android/app/src/main/java/com/awesomeproject/MainApplication.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import com.facebook.react.ReactPackage;
1010
import com.facebook.soloader.SoLoader;
1111
import java.lang.reflect.InvocationTargetException;
12+
import com.facebook.react.bridge.JSIModulePackage;
13+
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
1214
import java.util.List;
1315

1416
public class MainApplication extends Application implements ReactApplication {
@@ -33,6 +35,11 @@ protected List<ReactPackage> getPackages() {
3335
protected String getJSMainModuleName() {
3436
return "index";
3537
}
38+
39+
@Override
40+
protected JSIModulePackage getJSIModulePackage() {
41+
return new ReanimatedJSIModulePackage(); // <- add
42+
}
3643
};
3744

3845
@Override

HelloWorld/android/app/src/main/res/values/styles.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<!-- Base application theme. -->
44
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
55
<!-- Customize your theme here. -->
6-
<item name="android:textColor">#000000</item>
76
</style>
87

98
</resources>

HelloWorld/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ buildscript {
66
minSdkVersion = 21
77
compileSdkVersion = 30
88
targetSdkVersion = 30
9-
ndkVersion = "20.1.5948944"
9+
ndkVersion = "21.4.7075529"
1010
}
1111
repositories {
1212
google()
1313
mavenCentral()
1414
}
1515
dependencies {
16-
classpath("com.android.tools.build:gradle:4.2.1")
16+
classpath('com.android.tools.build:gradle:4.2.2')
1717
// NOTE: Do not place your application dependencies here; they belong
1818
// in the individual module build.gradle files
1919
}

HelloWorld/android/gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
android.useAndroidX=true
2424
# Automatically convert third-party libraries to use AndroidX
2525
android.enableJetifier=true
26+
android.injected.studio.version.check = false
2627

2728
# Version of flipper SDK to use with React Native
28-
FLIPPER_VERSION=0.93.0
29+
FLIPPER_VERSION=0.99.0
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Thu Oct 21 10:01:48 CST 2021
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip

HelloWorld/ios/HelloWorld.xcodeproj/project.pbxproj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@
145145
622F9E4A846C29988DEAB0F7 /* Pods-HelloWorld-HelloWorldTests.debug.xcconfig */,
146146
91987C5B2D1B1495ED9A75CD /* Pods-HelloWorld-HelloWorldTests.release.xcconfig */,
147147
);
148-
name = Pods;
149148
path = Pods;
150149
sourceTree = "<group>";
151150
};
@@ -484,7 +483,10 @@
484483
buildSettings = {
485484
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
486485
CLANG_ENABLE_MODULES = YES;
486+
CODE_SIGN_IDENTITY = "Apple Development";
487+
CODE_SIGN_STYLE = Automatic;
487488
CURRENT_PROJECT_VERSION = 1;
489+
DEVELOPMENT_TEAM = "";
488490
ENABLE_BITCODE = NO;
489491
INFOPLIST_FILE = HelloWorld/Info.plist;
490492
LD_RUNPATH_SEARCH_PATHS = (
@@ -498,6 +500,7 @@
498500
);
499501
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
500502
PRODUCT_NAME = HelloWorld;
503+
PROVISIONING_PROFILE_SPECIFIER = "";
501504
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
502505
SWIFT_VERSION = 5.0;
503506
VERSIONING_SYSTEM = "apple-generic";
@@ -510,7 +513,10 @@
510513
buildSettings = {
511514
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
512515
CLANG_ENABLE_MODULES = YES;
516+
CODE_SIGN_IDENTITY = "Apple Development";
517+
CODE_SIGN_STYLE = Automatic;
513518
CURRENT_PROJECT_VERSION = 1;
519+
DEVELOPMENT_TEAM = "";
514520
INFOPLIST_FILE = HelloWorld/Info.plist;
515521
LD_RUNPATH_SEARCH_PATHS = (
516522
"$(inherited)",
@@ -523,6 +529,7 @@
523529
);
524530
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
525531
PRODUCT_NAME = HelloWorld;
532+
PROVISIONING_PROFILE_SPECIFIER = "";
526533
SWIFT_VERSION = 5.0;
527534
VERSIONING_SYSTEM = "apple-generic";
528535
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)