Skip to content

Commit cbee1f9

Browse files
chore(deps): update Android SDK to v7.3.0 (#3434)
Co-authored-by: Krystof Woldrich <[email protected]>
1 parent 87d53fd commit cbee1f9

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

CHANGELOG.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
This release contains upgrade of `sentry-android` dependency to major version 7. There are no breaking changes in the JS API. If you are using the Android API please check [the migration guide](https://docs.sentry.io/platforms/android/migration/#migrating-from-iosentrysentry-android-6x-to-iosentrysentry-android-700).
6+
7+
### Fixes
8+
9+
- Upload Debug Symbols Build Phase continues when `node` not found in `WITH_ENVIRONMENT` ([#3573](https://github.com/getsentry/sentry-react-native/pull/3573))
10+
11+
### Dependencies
12+
13+
- Bump Android SDK from v6.34.0 to v7.3.0 ([#3434](https://github.com/getsentry/sentry-react-native/pull/3434))
14+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#730)
15+
- [diff](https://github.com/getsentry/sentry-java/compare/6.34.0...7.3.0)
16+
317
## 5.18.0
418

519
### Features
@@ -26,7 +40,6 @@
2640
- Fetch Organization slug from `@sentry/react-native/expo` config when uploading artifacts ([#3557](https://github.com/getsentry/sentry-react-native/pull/3557))
2741
- Remove 404 Http Client Errors reports for Metro Dev Server Requests ([#3553](https://github.com/getsentry/sentry-react-native/pull/3553))
2842
- Stop tracing Spotlight Sidecar network request in JS ([#3559](https://github.com/getsentry/sentry-react-native/pull/3559))
29-
- Upload Debug Symbols Build Phase continues when `node` not found in `WITH_ENVIRONMENT` ([#3573](https://github.com/getsentry/sentry-react-native/pull/3573))
3043

3144
## 5.17.0
3245

android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ android {
5454

5555
dependencies {
5656
implementation 'com.facebook.react:react-native:+'
57-
api 'io.sentry:sentry-android:6.34.0'
57+
api 'io.sentry:sentry-android:7.3.0'
5858
}

android/src/main/java/io/sentry/react/RNSentryModuleImpl.java

+6-11
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import com.facebook.react.bridge.Arguments;
1616
import com.facebook.react.bridge.Promise;
1717
import com.facebook.react.bridge.ReactApplicationContext;
18-
import com.facebook.react.bridge.ReadableArray;
1918
import com.facebook.react.bridge.ReadableMap;
2019
import com.facebook.react.bridge.ReadableMapKeySetIterator;
2120
import com.facebook.react.bridge.UiThreadUtil;
@@ -31,7 +30,6 @@
3130
import java.io.BufferedReader;
3231
import java.io.File;
3332
import java.io.FileNotFoundException;
34-
import java.io.FileOutputStream;
3533
import java.io.FileReader;
3634
import java.io.InputStream;
3735
import java.nio.charset.Charset;
@@ -45,9 +43,9 @@
4543
import io.sentry.DateUtils;
4644
import io.sentry.HubAdapter;
4745
import io.sentry.ILogger;
46+
import io.sentry.IScope;
4847
import io.sentry.ISerializer;
4948
import io.sentry.Integration;
50-
import io.sentry.Scope;
5149
import io.sentry.Sentry;
5250
import io.sentry.SentryDate;
5351
import io.sentry.SentryEvent;
@@ -56,7 +54,6 @@
5654
import io.sentry.UncaughtExceptionHandlerIntegration;
5755
import io.sentry.android.core.AndroidLogger;
5856
import io.sentry.android.core.AnrIntegration;
59-
import io.sentry.android.core.AppStartState;
6057
import io.sentry.android.core.BuildConfig;
6158
import io.sentry.android.core.BuildInfoProvider;
6259
import io.sentry.android.core.CurrentActivityHolder;
@@ -65,6 +62,7 @@
6562
import io.sentry.android.core.SentryAndroid;
6663
import io.sentry.android.core.SentryAndroidOptions;
6764
import io.sentry.android.core.ViewHierarchyEventProcessor;
65+
import io.sentry.android.core.performance.AppStartMetrics;
6866
import io.sentry.protocol.SdkVersion;
6967
import io.sentry.protocol.SentryException;
7068
import io.sentry.protocol.SentryPackage;
@@ -261,16 +259,13 @@ public void fetchNativeRelease(Promise promise) {
261259
}
262260

263261
public void fetchNativeAppStart(Promise promise) {
264-
final AppStartState appStartInstance = AppStartState.getInstance();
265-
final SentryDate appStartTime = appStartInstance.getAppStartTime();
266-
final Boolean isColdStart = appStartInstance.isColdStart();
262+
final AppStartMetrics appStartInstance = AppStartMetrics.getInstance();
263+
final SentryDate appStartTime = appStartInstance.getAppStartTimeSpan().getStartTimestamp();
264+
final boolean isColdStart = appStartInstance.getAppStartType() == AppStartMetrics.AppStartType.COLD;
267265

268266
if (appStartTime == null) {
269267
logger.log(SentryLevel.WARNING, "App start won't be sent due to missing appStartTime.");
270268
promise.resolve(null);
271-
} else if (isColdStart == null) {
272-
logger.log(SentryLevel.WARNING, "App start won't be sent due to missing isColdStart.");
273-
promise.resolve(null);
274269
} else {
275270
final double appStartTimestampMs = DateUtils.nanosToMillis(appStartTime.nanoTimestamp());
276271

@@ -684,7 +679,7 @@ public void fetchNativeDeviceContexts(Promise promise) {
684679
return;
685680
}
686681

687-
final @Nullable Scope currentScope = InternalSentrySdk.getCurrentScope();
682+
final @Nullable IScope currentScope = InternalSentrySdk.getCurrentScope();
688683
final @NotNull Map<String, Object> serialized = InternalSentrySdk.serializeScope(
689684
context,
690685
(SentryAndroidOptions) options,

samples/react-native/android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ buildscript {
1616
classpath("com.android.tools.build:gradle")
1717
classpath("com.facebook.react:react-native-gradle-plugin")
1818
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
19-
classpath("io.sentry:sentry-android-gradle-plugin:3.11.1")
19+
classpath("io.sentry:sentry-android-gradle-plugin:4.2.0")
2020
}
2121
}
2222

0 commit comments

Comments
 (0)