Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update Android SDK to v7.3.0 #3434

Merged
merged 2 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## Unreleased

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).

### Fixes

- Upload Debug Symbols Build Phase continues when `node` not found in `WITH_ENVIRONMENT` ([#3573](https://github.com/getsentry/sentry-react-native/pull/3573))

### Dependencies

- Bump Android SDK from v6.34.0 to v7.3.0 ([#3434](https://github.com/getsentry/sentry-react-native/pull/3434))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#730)
- [diff](https://github.com/getsentry/sentry-java/compare/6.34.0...7.3.0)

## 5.18.0

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

## 5.17.0

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ android {

dependencies {
implementation 'com.facebook.react:react-native:+'
api 'io.sentry:sentry-android:6.34.0'
api 'io.sentry:sentry-android:7.3.0'
}
17 changes: 6 additions & 11 deletions android/src/main/java/io/sentry/react/RNSentryModuleImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.ReadableMapKeySetIterator;
import com.facebook.react.bridge.UiThreadUtil;
Expand All @@ -31,7 +30,6 @@
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.InputStream;
import java.nio.charset.Charset;
Expand All @@ -45,9 +43,9 @@
import io.sentry.DateUtils;
import io.sentry.HubAdapter;
import io.sentry.ILogger;
import io.sentry.IScope;
import io.sentry.ISerializer;
import io.sentry.Integration;
import io.sentry.Scope;
import io.sentry.Sentry;
import io.sentry.SentryDate;
import io.sentry.SentryEvent;
Expand All @@ -56,7 +54,6 @@
import io.sentry.UncaughtExceptionHandlerIntegration;
import io.sentry.android.core.AndroidLogger;
import io.sentry.android.core.AnrIntegration;
import io.sentry.android.core.AppStartState;
import io.sentry.android.core.BuildConfig;
import io.sentry.android.core.BuildInfoProvider;
import io.sentry.android.core.CurrentActivityHolder;
Expand All @@ -65,6 +62,7 @@
import io.sentry.android.core.SentryAndroid;
import io.sentry.android.core.SentryAndroidOptions;
import io.sentry.android.core.ViewHierarchyEventProcessor;
import io.sentry.android.core.performance.AppStartMetrics;
import io.sentry.protocol.SdkVersion;
import io.sentry.protocol.SentryException;
import io.sentry.protocol.SentryPackage;
Expand Down Expand Up @@ -261,16 +259,13 @@ public void fetchNativeRelease(Promise promise) {
}

public void fetchNativeAppStart(Promise promise) {
final AppStartState appStartInstance = AppStartState.getInstance();
final SentryDate appStartTime = appStartInstance.getAppStartTime();
final Boolean isColdStart = appStartInstance.isColdStart();
final AppStartMetrics appStartInstance = AppStartMetrics.getInstance();
final SentryDate appStartTime = appStartInstance.getAppStartTimeSpan().getStartTimestamp();
final boolean isColdStart = appStartInstance.getAppStartType() == AppStartMetrics.AppStartType.COLD;

if (appStartTime == null) {
logger.log(SentryLevel.WARNING, "App start won't be sent due to missing appStartTime.");
promise.resolve(null);
} else if (isColdStart == null) {
logger.log(SentryLevel.WARNING, "App start won't be sent due to missing isColdStart.");
promise.resolve(null);
} else {
final double appStartTimestampMs = DateUtils.nanosToMillis(appStartTime.nanoTimestamp());

Expand Down Expand Up @@ -684,7 +679,7 @@ public void fetchNativeDeviceContexts(Promise promise) {
return;
}

final @Nullable Scope currentScope = InternalSentrySdk.getCurrentScope();
final @Nullable IScope currentScope = InternalSentrySdk.getCurrentScope();
final @NotNull Map<String, Object> serialized = InternalSentrySdk.serializeScope(
context,
(SentryAndroidOptions) options,
Expand Down
2 changes: 1 addition & 1 deletion samples/react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
classpath("io.sentry:sentry-android-gradle-plugin:3.11.1")
classpath("io.sentry:sentry-android-gradle-plugin:4.2.0")
}
}

Expand Down
Loading