Skip to content

Commit e44fe2d

Browse files
chore: update scripts/update-rn.sh to v0.72.0 (#3146)
Co-authored-by: GitHub <[email protected]>
1 parent 0677344 commit e44fe2d

File tree

20 files changed

+2219
-2732
lines changed

20 files changed

+2219
-2732
lines changed

.github/workflows/e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
strategy:
149149
fail-fast: false # keeps matrix running if one fails
150150
matrix:
151-
rn-version: ['0.65.3', '0.71.3']
151+
rn-version: ['0.65.3', '0.72.0']
152152
rn-architecture: ['legacy', 'new']
153153
platform: ['android', 'ios']
154154
build-type: ['dev', 'production']
@@ -344,7 +344,7 @@ jobs:
344344
strategy:
345345
fail-fast: false # keeps matrix running if one fails
346346
matrix:
347-
rn-version: ['0.65.3', '0.71.3']
347+
rn-version: ['0.65.3', '0.72.0']
348348
rn-architecture: ['legacy', 'new']
349349
platform: ['android', 'ios']
350350
build-type: ['production']

.github/workflows/sample-application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
path: |
5656
node_modules
5757
sample-new-architecture/node_modules
58-
key: ${{ github.workflow }}-${{ github.job }}-npm-${{ hashFiles('yarn.lock', 'sample-new-architecture/node_modules/yarn.lock') }}
58+
key: ${{ github.workflow }}-${{ github.job }}-npm-${{ hashFiles('yarn.lock', 'sample-new-architecture/yarn.lock') }}
5959

6060
- name: Install SDK Dependencies
6161
if: ${{ steps.deps-cache.outputs['cache-hit'] != 'true' }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"jest-environment-jsdom": "^29.4.1",
8181
"prettier": "^2.0.5",
8282
"react": "18.2.0",
83-
"react-native": "0.71.7",
83+
"react-native": "0.72.0",
8484
"replace-in-file": "^6.0.0",
8585
"rimraf": "^4.1.1",
8686
"ts-jest": "^29.0.5",

sample-new-architecture/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
root: true,
3-
extends: '@react-native-community',
3+
extends: '@react-native',
44
parser: '@typescript-eslint/parser',
55
plugins: ['@typescript-eslint'],
66
overrides: [

sample-new-architecture/__tests__/App-test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
* @format
33
*/
44

5-
import 'react-native';
65
import React from 'react';
76

7+
// Note: import explicitly to use the types shipped with jest.
8+
import { it } from '@jest/globals';
9+
810
// Note: test renderer must be required after react-native.
911
import renderer from 'react-test-renderer';
1012

sample-new-architecture/android/app/build.gradle

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ apply plugin: "com.android.application"
22
apply plugin: "com.facebook.react"
33
apply plugin: "io.sentry.android.gradle"
44

5-
import com.android.build.OutputFile
6-
75
sentry {
86
// Disables or enables the automatic configuration of Native Symbols
97
// for Sentry. This executes sentry-cli automatically so
@@ -24,8 +22,8 @@ react {
2422
// root = file("../")
2523
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
2624
// reactNativeDir = file("../node_modules/react-native")
27-
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
28-
// codegenDir = file("../node_modules/react-native-codegen")
25+
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
26+
// codegenDir = file("../node_modules/@react-native/codegen")
2927
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
3028
// cliFile = file("../node_modules/react-native/cli.js")
3129
/* Variants */
@@ -71,14 +69,6 @@ project.ext.sentryCli = [
7169

7270
apply from: "../../../sentry.gradle"
7371

74-
/**
75-
* Set this to true to create four separate APKs instead of one,
76-
* one for each native architecture. This is useful if you don't
77-
* use App Bundles (https://developer.android.com/guide/app-bundle/)
78-
* and want to have separate APKs to upload to the Play Store.
79-
*/
80-
def enableSeparateBuildPerCPUArchitecture = false
81-
8272
/**
8373
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
8474
*/
@@ -97,14 +87,6 @@ def enableProguardInReleaseBuilds = true
9787
*/
9888
def jscFlavor = 'org.webkit:android-jsc:+'
9989

100-
/**
101-
* Architectures to build native code for.
102-
*/
103-
def reactNativeArchitectures() {
104-
def value = project.getProperties().get("reactNativeArchitectures")
105-
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
106-
}
107-
10890
android {
10991
ndkVersion rootProject.ext.ndkVersion
11092

@@ -119,14 +101,6 @@ android {
119101
versionName "1.0"
120102
}
121103

122-
splits {
123-
abi {
124-
reset()
125-
enable enableSeparateBuildPerCPUArchitecture
126-
universalApk false // If true, also generate a universal APK
127-
include (*reactNativeArchitectures())
128-
}
129-
}
130104
signingConfigs {
131105
debug {
132106
storeFile file('debug.keystore')
@@ -147,32 +121,12 @@ android {
147121
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
148122
}
149123
}
150-
151-
// applicationVariants are e.g. debug, release
152-
applicationVariants.all { variant ->
153-
variant.outputs.each { output ->
154-
// For each separate APK per architecture, set a unique version code as described here:
155-
// https://developer.android.com/studio/build/configure-apk-splits.html
156-
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
157-
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
158-
def abi = output.getFilter(OutputFile.ABI)
159-
if (abi != null) { // null for the universal-debug, universal-release variants
160-
output.versionCodeOverride =
161-
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
162-
}
163-
164-
}
165-
}
166-
167-
168124
}
169125

170126
dependencies {
171127
// The version of react-native is set by the React Native Gradle Plugin
172128
implementation("com.facebook.react:react-android")
173129

174-
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
175-
176130
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
177131
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
178132
exclude group:'com.squareup.okhttp3', module:'okhttp'

sample-new-architecture/android/app/src/main/java/com/samplenewarchitecture/MainActivity.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ protected ReactActivityDelegate createReactActivityDelegate() {
2828
this,
2929
getMainComponentName(),
3030
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
31-
DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
32-
// If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
33-
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
34-
);
31+
DefaultNewArchitectureEntryPoint.getFabricEnabled());
3532
}
3633

3734
@Override

sample-new-architecture/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ buildscript {
1515
mavenCentral()
1616
}
1717
dependencies {
18-
classpath("com.android.tools.build:gradle:7.3.1")
18+
classpath("com.android.tools.build:gradle")
1919
classpath("com.facebook.react:react-native-gradle-plugin")
20-
classpath("io.sentry:sentry-android-gradle-plugin:3.4.2")
20+
classpath("io.sentry:sentry-android-gradle-plugin:3.11.1")
2121
}
2222
}

sample-new-architecture/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ android.useAndroidX=true
2525
android.enableJetifier=true
2626

2727
# Version of flipper SDK to use with React Native
28-
FLIPPER_VERSION=0.164.0
28+
FLIPPER_VERSION=0.182.0
2929

3030
# Use this property to specify which architecture you want to build.
3131
# You can also override it from the CLI using
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)