Skip to content

Commit 9ccff54

Browse files
misc: upgrade to [email protected] (#63)
1 parent 5a72eaa commit 9ccff54

File tree

26 files changed

+2641
-2055
lines changed

26 files changed

+2641
-2055
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
ios/.xcode.env.local
23+
**/.xcode.env.local
2424

2525
# Android/IntelliJ
2626
#
@@ -56,11 +56,11 @@ yarn-error.log
5656
*.jsbundle
5757

5858
# Ruby / CocoaPods
59-
/ios/Pods/
59+
**/Pods/
6060
/vendor/bundle/
6161
# Temporary files created by Metro to check the health of the file watcher
6262
.metro-health-check*
6363
# testing
6464
/coverage
6565

66-
.env
66+
.env

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ source 'https://rubygems.org'
44
ruby "3.3.0"
55

66
gem 'cocoapods', '~> 1.15.2'
7+
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'

Gemfile.lock

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,10 @@ GEM
55
base64
66
nkf
77
rexml
8-
activesupport (7.1.3.3)
9-
base64
10-
bigdecimal
8+
activesupport (7.0.8.3)
119
concurrent-ruby (~> 1.0, >= 1.0.2)
12-
connection_pool (>= 2.2.5)
13-
drb
1410
i18n (>= 1.6, < 2)
1511
minitest (>= 5.1)
16-
mutex_m
1712
tzinfo (~> 2.0)
1813
addressable (2.8.6)
1914
public_suffix (>= 2.0.2, < 6.0)
@@ -22,7 +17,6 @@ GEM
2217
json (>= 1.5.1)
2318
atomos (0.1.3)
2419
base64 (0.2.0)
25-
bigdecimal (3.1.8)
2620
claide (1.1.0)
2721
cocoapods (1.15.2)
2822
addressable (~> 2.8)
@@ -63,8 +57,6 @@ GEM
6357
cocoapods-try (1.2.0)
6458
colored2 (3.1.2)
6559
concurrent-ruby (1.2.3)
66-
connection_pool (2.4.1)
67-
drb (2.2.1)
6860
escape (0.0.4)
6961
ethon (0.16.0)
7062
ffi (>= 1.15.0)
@@ -78,7 +70,6 @@ GEM
7870
json (2.7.2)
7971
minitest (5.23.0)
8072
molinillo (0.8.0)
81-
mutex_m (0.2.0)
8273
nanaimo (0.3.0)
8374
nap (1.1.0)
8475
netrc (0.11.0)
@@ -104,6 +95,7 @@ PLATFORMS
10495
ruby
10596

10697
DEPENDENCIES
98+
activesupport (>= 6.1.7.5, < 7.1.0)
10799
cocoapods (~> 1.15.2)
108100

109101
RUBY VERSION

__tests__/App.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'react-native';
66
import React from 'react';
77
// import App from '../src/App';
88

9-
// Note: import explicitly to use the types shiped with jest.
9+
// Note: import explicitly to use the types shipped with jest.
1010
import {it} from '@jest/globals';
1111

1212
// Note: test renderer must be required after react-native.

android/app/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
23
apply plugin: "com.facebook.react"
34
apply plugin: "io.sentry.android.gradle"
45

@@ -99,7 +100,8 @@ apply from: "../../node_modules/@sentry/react-native/sentry.gradle"
99100
android {
100101
ndkVersion rootProject.ext.ndkVersion
101102

102-
compileSdkVersion rootProject.ext.compileSdkVersion
103+
buildToolsVersion rootProject.ext.buildToolsVersion
104+
compileSdk rootProject.ext.compileSdkVersion
103105

104106
namespace "com.sentry_react_native"
105107
defaultConfig {
@@ -129,11 +131,15 @@ android {
129131
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
130132
}
131133
}
134+
kotlinOptions {
135+
jvmTarget = '17'
136+
}
132137
}
133138

134139
dependencies {
135140
// The version of react-native is set by the React Native Gradle Plugin
136141
implementation("com.facebook.react:react-android")
142+
implementation 'androidx.core:core-ktx:+'
137143

138144
if (hermesEnabled.toBoolean()) {
139145
implementation("com.facebook.react:hermes-android")

android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@
77
<application
88
android:usesCleartextTraffic="true"
99
tools:targetApi="28"
10-
tools:ignore="GoogleAppIndexingWarning">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12-
</application>
10+
tools:ignore="GoogleAppIndexingWarning" />
1311
</manifest>

android/app/src/main/java/com/sentry_react_native/MainActivity.java

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.sentry_react_native
2+
3+
import android.os.Bundle
4+
import com.facebook.react.ReactActivity
5+
import com.facebook.react.ReactActivityDelegate
6+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
7+
import com.facebook.react.defaults.DefaultReactActivityDelegate
8+
9+
class MainActivity : ReactActivity() {
10+
/**
11+
* Returns the name of the main component registered from JavaScript. This is used to schedule
12+
* rendering of the component.
13+
*/
14+
override fun getMainComponentName(): String {
15+
return "sentry_react_native"
16+
}
17+
18+
/**
19+
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
20+
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
21+
*/
22+
override fun createReactActivityDelegate(): ReactActivityDelegate {
23+
return DefaultReactActivityDelegate(
24+
this,
25+
mainComponentName, // If you opted-in for the New Architecture, we enable the Fabric Renderer.
26+
fabricEnabled)
27+
}
28+
29+
override fun onCreate(savedInstanceState: Bundle?) {
30+
super.onCreate(null)
31+
}
32+
}

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

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package com.sentry_react_native
2+
3+
import android.app.Application
4+
import com.facebook.react.PackageList
5+
import com.facebook.react.ReactApplication
6+
import com.facebook.react.ReactHost
7+
import com.facebook.react.ReactNativeHost
8+
import com.facebook.react.ReactPackage
9+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
10+
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
11+
import com.facebook.react.defaults.DefaultReactNativeHost
12+
import com.facebook.soloader.SoLoader
13+
14+
class MainApplication : Application(), ReactApplication {
15+
override val reactNativeHost: ReactNativeHost =
16+
object : DefaultReactNativeHost(this) {
17+
override fun getPackages(): List<ReactPackage> =
18+
PackageList(this).packages.apply {
19+
// Packages that cannot be autolinked yet can be added manually here, for example:
20+
// add(MyReactNativePackage())
21+
}
22+
23+
override fun getJSMainModuleName(): String = "index"
24+
25+
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
26+
27+
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
28+
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
29+
}
30+
31+
override val reactHost: ReactHost
32+
get() = getDefaultReactHost(applicationContext, reactNativeHost)
33+
34+
override fun onCreate() {
35+
super.onCreate()
36+
SoLoader.init(this, false)
37+
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
38+
// If you opted-in for the New Architecture, we load the native entry point for this app.
39+
load()
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)