Skip to content

Commit f73be29

Browse files
committed
react-native -> 0.75.3
This upgrades the example app and devDependencies to react-native version 0.75.3, based on the latest react-native app template. * ios: The example app seems to need new Unity artifacts that support arm64 correctly (both simulator and device) for the app to build and run correctly again. This was already a problem before upgrading react-native so leaving this as-is for now.
1 parent ec612db commit f73be29

40 files changed

+7245
-9456
lines changed

example/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
root: true,
3-
extends: '@react-native-community',
3+
extends: '@react-native',
44
};

example/.gitignore

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
ios/.xcode.env.local
24-
ios/Podfile.lock
23+
**/.xcode.env.local
24+
**/Podfile.lock
2525

2626
# Android/IntelliJ
2727
#
@@ -40,6 +40,7 @@ local.properties
4040
node_modules/
4141
npm-debug.log
4242
yarn-error.log
43+
package-lock.json
4344

4445
# fastlane
4546
#
@@ -57,11 +58,20 @@ yarn-error.log
5758
*.jsbundle
5859

5960
# Ruby / CocoaPods
60-
/ios/Pods/
61+
**/Pods/
6162
/vendor/bundle/
63+
Gemfile.lock
6264

6365
# Temporary files created by Metro to check the health of the file watcher
6466
.metro-health-check*
6567

66-
# Don't commit this file
67-
package-lock.json
68+
# testing
69+
/coverage
70+
71+
# Yarn
72+
.yarn/*
73+
!.yarn/patches
74+
!.yarn/plugins
75+
!.yarn/releases
76+
!.yarn/sdks
77+
!.yarn/versions

example/.node-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/.watchmanconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}

example/Gemfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby File.read(File.join(__dir__, '.ruby-version')).strip
4+
ruby ">= 2.6.10"
55

6-
gem 'cocoapods', '~> 1.11', '>= 1.11.3'
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'

example/Gemfile.lock

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

example/__tests__/App-test.tsx renamed to example/__tests__/App.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import 'react-native';
66
import React from 'react';
77
import App from '../App';
88

9+
// Note: import explicitly to use the types shipped with jest.
10+
import {it} from '@jest/globals';
11+
912
// Note: test renderer must be required after react-native.
1013
import renderer from 'react-test-renderer';
1114

example/android/app/build.gradle

Lines changed: 14 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
23
apply plugin: "com.facebook.react"
34

4-
import com.android.build.OutputFile
5-
65
/**
76
* This is the configuration block to customize your React Native Android app.
87
* By default you don't need to apply any configuration, just uncomment the lines you need.
98
*/
109
react {
1110
/* Folders */
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")
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")
2019

2120
/* Variants */
2221
// The list of variants to that are debuggable. For those we're going to
@@ -50,15 +49,10 @@ react {
5049
//
5150
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5251
// hermesFlags = ["-O", "-output-source-map"]
53-
}
5452

55-
/**
56-
* Set this to true to create four separate APKs instead of one,
57-
* one for each native architecture. This is useful if you don't
58-
* use App Bundles (https://developer.android.com/guide/app-bundle/)
59-
* and want to have separate APKs to upload to the Play Store.
60-
*/
61-
def enableSeparateBuildPerCPUArchitecture = false
53+
/* Autolinking */
54+
autolinkLibrariesWithApp()
55+
}
6256

6357
/**
6458
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
@@ -78,20 +72,10 @@ def enableProguardInReleaseBuilds = false
7872
*/
7973
def jscFlavor = 'org.webkit:android-jsc:+'
8074

81-
/**
82-
* Private function to get the list of Native Architectures you want to build.
83-
* This reads the value from reactNativeArchitectures in your gradle.properties
84-
* file and works together with the --active-arch-only flag of react-native run-android.
85-
*/
86-
def reactNativeArchitectures() {
87-
def value = project.getProperties().get("reactNativeArchitectures")
88-
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
89-
}
90-
9175
android {
9276
ndkVersion rootProject.ext.ndkVersion
93-
94-
compileSdkVersion rootProject.ext.compileSdkVersion
77+
buildToolsVersion rootProject.ext.buildToolsVersion
78+
compileSdk rootProject.ext.compileSdkVersion
9579

9680
namespace "com.example2"
9781
defaultConfig {
@@ -101,15 +85,6 @@ android {
10185
versionCode 1
10286
versionName "1.0"
10387
}
104-
105-
splits {
106-
abi {
107-
reset()
108-
enable enableSeparateBuildPerCPUArchitecture
109-
universalApk false // If true, also generate a universal APK
110-
include (*reactNativeArchitectures())
111-
}
112-
}
11388
signingConfigs {
11489
debug {
11590
storeFile file('debug.keystore')
@@ -130,41 +105,15 @@ android {
130105
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
131106
}
132107
}
133-
134-
// applicationVariants are e.g. debug, release
135-
applicationVariants.all { variant ->
136-
variant.outputs.each { output ->
137-
// For each separate APK per architecture, set a unique version code as described here:
138-
// https://developer.android.com/studio/build/configure-apk-splits.html
139-
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
140-
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
141-
def abi = output.getFilter(OutputFile.ABI)
142-
if (abi != null) { // null for the universal-debug, universal-release variants
143-
output.versionCodeOverride =
144-
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
145-
}
146-
147-
}
148-
}
149108
}
150109

151110
dependencies {
152111
// The version of react-native is set by the React Native Gradle Plugin
153112
implementation("com.facebook.react:react-android")
154113

155-
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
156-
157-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
158-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
159-
exclude group:'com.squareup.okhttp3', module:'okhttp'
160-
}
161-
162-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
163114
if (hermesEnabled.toBoolean()) {
164115
implementation("com.facebook.react:hermes-android")
165116
} else {
166117
implementation jscFlavor
167118
}
168119
}
169-
170-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

example/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>

0 commit comments

Comments
 (0)