Skip to content

Commit 1344267

Browse files
authored
Merge pull request #100 from sentry-demos/upgrade-rn-79
Upgrade to RN 0.79 and Sentry SDK 6.14.0
2 parents 7931a82 + 244d656 commit 1344267

28 files changed

+4885
-6829
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ local.properties
3333
.cxx/
3434
*.keystore
3535
!debug.keystore
36+
.kotlin/
3637

3738
# node.js
3839
#

Gemfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,14 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby "3.3.0"
55

6-
gem 'cocoapods', '~> 1.15.2'
7-
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
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'
9+
gem 'xcodeproj', '< 1.26.0'
10+
gem 'concurrent-ruby', '< 1.3.4'
11+
12+
# Ruby 3.4.0 has removed some libraries from the standard library.
13+
gem 'bigdecimal'
14+
gem 'logger'
15+
gem 'benchmark'
16+
gem 'mutex_m'

Gemfile.lock

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ GEM
1717
json (>= 1.5.1)
1818
atomos (0.1.3)
1919
base64 (0.2.0)
20+
benchmark (0.4.0)
21+
bigdecimal (3.1.9)
2022
claide (1.1.0)
2123
cocoapods (1.15.2)
2224
addressable (~> 2.8)
@@ -68,8 +70,10 @@ GEM
6870
i18n (1.14.5)
6971
concurrent-ruby (~> 1.0)
7072
json (2.7.2)
73+
logger (1.7.0)
7174
minitest (5.23.0)
7275
molinillo (0.8.0)
76+
mutex_m (0.3.0)
7377
nanaimo (0.3.0)
7478
nap (1.1.0)
7579
netrc (0.11.0)
@@ -95,8 +99,14 @@ PLATFORMS
9599
ruby
96100

97101
DEPENDENCIES
98-
activesupport (>= 6.1.7.5, < 7.1.0)
99-
cocoapods (~> 1.15.2)
102+
activesupport (>= 6.1.7.5, != 7.1.0)
103+
benchmark
104+
bigdecimal
105+
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
106+
concurrent-ruby (< 1.3.4)
107+
logger
108+
mutex_m
109+
xcodeproj (< 1.26.0)
100110

101111
RUBY VERSION
102112
ruby 3.3.0p0

android/app/build.gradle

Lines changed: 4 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -38,53 +38,9 @@ sentry {
3838
}
3939
}
4040

41-
/**
42-
* This is the configuration block to customize your React Native Android app.
43-
* By default you don't need to apply any configuration, just uncomment the lines you need.
44-
*/
4541
react {
46-
/* Folders */
47-
// The root of your project, i.e. where "package.json" lives. Default is '..'
48-
// root = file("../")
49-
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
50-
// reactNativeDir = file("../node_modules/react-native")
51-
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
52-
// codegenDir = file("../node_modules/@react-native/codegen")
53-
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
54-
// cliFile = file("../node_modules/react-native/cli.js")
55-
56-
/* Variants */
57-
// The list of variants to that are debuggable. For those we're going to
58-
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
59-
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
60-
// debuggableVariants = ["liteDebug", "prodDebug"]
61-
62-
/* Bundling */
63-
// A list containing the node command and its flags. Default is just 'node'.
64-
// nodeExecutableAndArgs = ["node"]
65-
//
66-
// The command to run when bundling. By default is 'bundle'
67-
// bundleCommand = "ram-bundle"
68-
//
69-
// The path to the CLI configuration file. Default is empty.
70-
// bundleConfig = file(../rn-cli.config.js)
71-
//
72-
// The name of the generated asset file containing your JS bundle
73-
// bundleAssetName = "MyApplication.android.bundle"
74-
//
75-
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
76-
// entryFile = file("../js/MyApplication.android.js")
77-
//
78-
// A list of extra flags to pass to the 'bundle' commands.
79-
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
80-
// extraPackagerArgs = []
81-
82-
/* Hermes Commands */
83-
// The hermes compiler command to run. By default it is 'hermesc'
84-
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
85-
//
86-
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
87-
// hermesFlags = ["-O", "-output-source-map"]
42+
/* Autolinking */
43+
autolinkLibrariesWithApp()
8844
}
8945

9046
/**
@@ -96,14 +52,14 @@ def enableProguardInReleaseBuilds = false
9652
* The preferred build flavor of JavaScriptCore (JSC)
9753
*
9854
* For example, to use the international variant, you can use:
99-
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
55+
* `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
10056
*
10157
* The international variant includes ICU i18n library and necessary data
10258
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
10359
* give correct results when using with locales other than en-US. Note that
10460
* this variant is about 6MiB larger per architecture than default.
10561
*/
106-
def jscFlavor = 'org.webkit:android-jsc:+'
62+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
10763

10864
apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")
10965
apply from: "../../node_modules/@sentry/react-native/sentry.gradle"
@@ -157,5 +113,3 @@ dependencies {
157113
implementation jscFlavor
158114
}
159115
}
160-
161-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
android:icon="@mipmap/ic_launcher"
99
android:roundIcon="@mipmap/ic_launcher_round"
1010
android:allowBackup="false"
11-
android:theme="@style/AppTheme">
11+
android:theme="@style/AppTheme"
12+
android:supportsRtl="true">
1213
<activity
1314
android:name=".MainActivity"
1415
android:label="@string/app_name"

android/app/src/main/java/com/sentry_react_native/MainApplication.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1010
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1111
import com.facebook.react.defaults.DefaultReactNativeHost
1212
import com.facebook.soloader.SoLoader
13+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
1314

1415
class MainApplication : Application(), ReactApplication {
1516
override val reactNativeHost: ReactNativeHost =
@@ -33,7 +34,7 @@ class MainApplication : Application(), ReactApplication {
3334

3435
override fun onCreate() {
3536
super.onCreate()
36-
SoLoader.init(this, false)
37+
SoLoader.init(this, OpenSourceMergedSoMapping)
3738
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
3839
// If you opted-in for the New Architecture, we load the native entry point for this app.
3940
load()

android/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "34.0.0"
6-
minSdkVersion = 23
7-
compileSdkVersion = 34
8-
targetSdkVersion = 34
9-
ndkVersion = "26.1.10909125"
10-
kotlinVersion = "1.9.22"
5+
buildToolsVersion = "35.0.0"
6+
minSdkVersion = 24
7+
compileSdkVersion = 35
8+
targetSdkVersion = 35
9+
ndkVersion = "27.1.12297006"
10+
kotlinVersion = "2.0.21"
1111
}
1212
repositories {
1313
google()

android/gradle.properties

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
2121
# Android operating system, and which are packaged with your app's APK
2222
# https://developer.android.com/topic/libraries/support-library/androidx-rn
2323
android.useAndroidX=true
24-
# Automatically convert third-party libraries to use AndroidX
25-
android.enableJetifier=true
2624

2725
# Use this property to specify which architecture you want to build.
2826
# You can also override it from the CLI using
@@ -34,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3432
# your application. You should enable this flag either if you want
3533
# to write custom TurboModules/Fabric components OR use libraries that
3634
# are providing them.
37-
newArchEnabled=false
35+
newArchEnabled=true
3836

3937
# Use this property to enable or disable the Hermes JS engine.
4038
# If set to false, you will be using JSC instead.
-19.5 KB
Binary file not shown.

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)