Skip to content

Commit 6fa6074

Browse files
authored
migrate to rn 0.64.1 (#1359)
* migrate to rn 0.64.1 * Fix lint issues * change require to see if tests will pass * Fix jest transformation
1 parent 080f6a1 commit 6fa6074

File tree

12 files changed

+79
-152
lines changed

12 files changed

+79
-152
lines changed

.flowconfig

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
; Ignore polyfills
99
node_modules/react-native/Libraries/polyfills/.*
1010

11-
; These should not be required directly
12-
; require from fbjs/lib instead: require('fbjs/lib/warning')
13-
node_modules/warning/.*
14-
1511
; Flow doesn't support platforms
1612
.*/Libraries/Utilities/LoadingView.js
1713

14+
exact_by_default=true
15+
1816
[untyped]
1917
.*/node_modules/@react-native-community/cli/.*/.*
2018

@@ -44,10 +42,6 @@ suppress_type=$FlowFixMe
4442
suppress_type=$FlowFixMeProps
4543
suppress_type=$FlowFixMeState
4644

47-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
48-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
49-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
50-
5145
[lints]
5246
sketchy-null-number=warn
5347
sketchy-null-mixed=warn
@@ -70,4 +64,4 @@ untyped-import
7064
untyped-type-import
7165

7266
[version]
73-
^0.122.0
67+
^0.137.0

_editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Windows files
2+
[*.bat]
3+
end_of_line = crlf

android/app/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def enableHermes = project.ext.react.get("enableHermes", false)
1515

1616
android {
1717
compileSdkVersion rootProject.ext.compileSdkVersion
18+
ndkVersion rootProject.ext.ndkVersion
1819

1920
compileOptions {
2021
sourceCompatibility JavaVersion.VERSION_1_8
@@ -63,11 +64,12 @@ android {
6364
variant.outputs.each { output ->
6465
// For each separate APK per architecture, set a unique version code as described here:
6566
// https://developer.android.com/studio/build/configure-apk-splits.html
67+
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
6668
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
6769
def abi = output.getFilter(OutputFile.ABI)
6870
if (abi != null) { // null for the universal-debug, universal-release variants
6971
output.versionCodeOverride =
70-
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
72+
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
7173
}
7274

7375
}

android/app/src/debug/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44

55
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
66

7-
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
7+
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning">
8+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
9+
</application>
810
</manifest>

android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,5 @@
2121
<category android:name="android.intent.category.LAUNCHER" />
2222
</intent-filter>
2323
</activity>
24-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
2524
</application>
26-
2725
</manifest>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<resources>
22

33
<!-- Base application theme. -->
4-
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
4+
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
55
<!-- Customize your theme here. -->
66
<item name="android:textColor">#000000</item>
77
</style>

android/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "29.0.2"
6-
minSdkVersion = 19
5+
buildToolsVersion = "29.0.3"
6+
minSdkVersion = 21
77
compileSdkVersion = 29
88
targetSdkVersion = 29
9+
ndkVersion = "20.1.5948944"
910
RNNKotlinVersion = "1.3.61" // Or any version above 1.3.x
1011
}
1112
repositories {
@@ -16,7 +17,7 @@ buildscript {
1617
}
1718
dependencies {
1819
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$RNNKotlinVersion"
19-
classpath 'com.android.tools.build:gradle:3.5.3'
20+
classpath("com.android.tools.build:gradle:4.1.0")
2021

2122
// NOTE: Do not place your application dependencies here; they belong
2223
// in the individual module build.gradle files

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ android.useAndroidX=true
2121
android.enableJetifier=true
2222

2323
# Version of flipper SDK to use with React Native
24-
FLIPPER_VERSION=0.37.0
24+
FLIPPER_VERSION=0.75.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

ios/Podfile

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,18 @@ target 'rnuilib' do
88

99
config = use_native_modules!
1010

11-
use_react_native!(:path => config["reactNativePath"])
11+
use_react_native!(
12+
:path => config[:reactNativePath],
13+
:hermes_enabled => false
14+
)
1215

1316
target 'rnuilibTests' do
1417
inherit! :complete
1518
# Pods for testing
19+
# use_flipper!()
1620
end
17-
18-
use_native_modules!
19-
20-
# Enables Flipper.
21-
#
22-
# Note that if you have use_frameworks! enabled, Flipper will not work and
23-
# you should disable these next few lines.
24-
# use_flipper!
25-
# post_install do |installer|
26-
# flipper_post_install(installer)
27-
# end
28-
end
29-
30-
target 'rnuilib-tvOS' do
31-
# Pods for rnuilib-tvOS
32-
33-
target 'rnuilib-tvOSTests' do
34-
inherit! :search_paths
35-
# Pods for testing
21+
22+
post_install do |installer|
23+
react_native_post_install(installer)
3624
end
3725
end

0 commit comments

Comments
 (0)