Skip to content
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ build/
.cxx/
.vscode/
.fvm/
.fvmrc

.test_coverage.dart
packages/**/coverage/*
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

### Dependencies

- Bump Android SDK from v8.31.0 to v8.32.0 ([#3506](https://github.com/getsentry/sentry-dart/pull/3506))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8320)
- [diff](https://github.com/getsentry/sentry-java/compare/8.31.0...8.32.0)
- Bump JavaScript SDK from v10.6.0 to v10.38.0 ([#3474](https://github.com/getsentry/sentry-dart/pull/3474))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#10380)
- [diff](https://github.com/getsentry/sentry-javascript/compare/10.6.0...10.38.0)
Expand Down
4 changes: 2 additions & 2 deletions min_version_test/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace 'com.example.minversiontest'

compileSdkVersion 35
compileSdkVersion 36
ndkVersion '21.4.7075529'

compileOptions {
Expand All @@ -51,7 +51,7 @@ android {
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion 35
targetSdkVersion 36
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName

Expand Down
7 changes: 4 additions & 3 deletions packages/flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 34
compileSdkVersion 36

// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
Expand All @@ -35,7 +35,7 @@ android {

defaultConfig {
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 36

ndk {
// Flutter does not currently support building for x86 Android (See Issue 9253).
Expand All @@ -62,7 +62,8 @@ android {
}

dependencies {
api 'io.sentry:sentry-android:8.31.0'
api 'io.sentry:sentry-android:8.32.0'
debugImplementation 'io.sentry:sentry-spotlight:8.32.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

// Required -- JUnit 4 framework
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {
languageVersion = System.getenv("KOTLIN_LANGUAGE_VERSION") ?: "1.7"
}

compileSdkVersion 35
compileSdkVersion 36

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -46,7 +46,7 @@ android {
defaultConfig {
applicationId "io.sentry.samples.flutter"
minSdkVersion flutter.minSdkVersion
targetSdkVersion 35
targetSdkVersion 36
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore_for_file: invalid_use_of_internal_member, depend_on_referenced_packages
// ignore_for_file: invalid_use_of_internal_member, depend_on_referenced_packages, experimental_member_use

import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: experimental_member_use, invalid_use_of_internal_member

import 'dart:convert';
import 'dart:io';

Expand All @@ -14,7 +16,6 @@ void main() {

Future<void> setupSentryAndApp(WidgetTester tester) async {
await SentryFlutter.init((options) {
// ignore: invalid_use_of_internal_member
options.automatedTestMode = true;
options.dsn = 'https://abc@def.ingest.sentry.io/1234567';
options.debug = true;
Expand All @@ -33,7 +34,6 @@ void main() {

testWidgets('native binding is initialized', (tester) async {
await setupSentryAndApp(tester);
// ignore: invalid_use_of_internal_member
expect(SentryFlutter.native, isNotNull);
});

Expand Down
22 changes: 22 additions & 0 deletions packages/flutter/example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -69,6 +70,7 @@
C4B1A3E5A486E474A287B9BF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F2579A3BD1D48D0BC33E4ADF /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
FDFDFB8E5235EA47CE65FBC5 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -84,6 +86,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
4DFA0D3B754F0E702B3CB4B1 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -115,6 +118,7 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
Expand Down Expand Up @@ -194,6 +198,9 @@
productType = "com.apple.product-type.bundle.unit-test";
};
97C146ED1CF9000F007C117D /* Runner */ = {
packageProductDependencies = (
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
);
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
Expand All @@ -219,6 +226,9 @@

/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
packageReferences = (
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
);
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
Expand Down Expand Up @@ -793,6 +803,18 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
isa = XCSwiftPackageProductDependency;
productName = FlutterGeneratedPluginSwiftPackage;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Prepare Flutter Framework Script"
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand All @@ -26,6 +44,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
Expand Down Expand Up @@ -54,11 +73,13 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/flutter/example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore_for_file: library_private_types_in_public_api
// ignore_for_file: library_private_types_in_public_api, experimental_member_use

import 'dart:async';
import 'dart:convert';
Expand Down
52 changes: 52 additions & 0 deletions packages/flutter/lib/src/native/java/binding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18167,6 +18167,58 @@ class SentryOptions extends jni$_.JObject {
.check();
}

static final _id_isEnableDatabaseTransactionTracing = _class.instanceMethodId(
r'isEnableDatabaseTransactionTracing',
r'()Z',
);

static final _isEnableDatabaseTransactionTracing =
jni$_.ProtectedJniExtensions.lookup<
jni$_.NativeFunction<
jni$_.JniResult Function(
jni$_.Pointer<jni$_.Void>,
jni$_.JMethodIDPtr,
)>>('globalEnv_CallBooleanMethod')
.asFunction<
jni$_.JniResult Function(
jni$_.Pointer<jni$_.Void>,
jni$_.JMethodIDPtr,
)>();

/// from: `public boolean isEnableDatabaseTransactionTracing()`
bool isEnableDatabaseTransactionTracing() {
return _isEnableDatabaseTransactionTracing(reference.pointer,
_id_isEnableDatabaseTransactionTracing as jni$_.JMethodIDPtr)
.boolean;
}

static final _id_setEnableDatabaseTransactionTracing =
_class.instanceMethodId(
r'setEnableDatabaseTransactionTracing',
r'(Z)V',
);

static final _setEnableDatabaseTransactionTracing =
jni$_.ProtectedJniExtensions.lookup<
jni$_.NativeFunction<
jni$_.JThrowablePtr Function(jni$_.Pointer<jni$_.Void>,
jni$_.JMethodIDPtr, jni$_.VarArgs<(jni$_.Int32,)>)>>(
'globalEnv_CallVoidMethod')
.asFunction<
jni$_.JThrowablePtr Function(
jni$_.Pointer<jni$_.Void>, jni$_.JMethodIDPtr, int)>();

/// from: `public void setEnableDatabaseTransactionTracing(boolean z)`
void setEnableDatabaseTransactionTracing(
bool z,
) {
_setEnableDatabaseTransactionTracing(
reference.pointer,
_id_setEnableDatabaseTransactionTracing as jni$_.JMethodIDPtr,
z ? 1 : 0)
.check();
}

static final _id_isEnabled = _class.instanceMethodId(
r'isEnabled',
r'()Z',
Expand Down
34 changes: 25 additions & 9 deletions packages/flutter/scripts/update-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
set -euo pipefail

cd $(dirname "$0")/../android
file='build.gradle'
content=$(cat $file)
regex='(io\.sentry:sentry-android:)([0-9\.]+(\-[a-z0-9\.]+)?)'
if ! [[ $content =~ $regex ]]; then
echo "Failed to find the android plugin version in $file"
build_gradle='build.gradle'
content=$(cat $build_gradle)

# Regex patterns for Sentry dependencies (both use the same version)
sentry_android_regex='(io\.sentry:sentry-android:)([0-9\.]+(\-[a-z0-9\.]+)?)'
sentry_spotlight_regex='(io\.sentry:sentry-spotlight:)([0-9\.]+(\-[a-z0-9\.]+)?)'

if ! [[ $content =~ $sentry_android_regex ]]; then
echo "Failed to find the android plugin version in $build_gradle"
exit 1
fi

Expand All @@ -18,10 +22,22 @@ get-repo)
echo "https://github.com/getsentry/sentry-java.git"
;;
set-version)
newValue="${BASH_REMATCH[1]}$2"
echo "${content/${BASH_REMATCH[0]}/$newValue}" >$file
# Regenerate Dart JNI bindings so they stay in sync with the updated Android SDK version.
../scripts/generate-jni-bindings.sh "$2"
new_version="$2"

# Update sentry-android
new_android_dependency="${BASH_REMATCH[1]}$new_version"
content="${content/${BASH_REMATCH[0]}/$new_android_dependency}"

# Update sentry-spotlight to match the same version (if present)
if [[ $content =~ $sentry_spotlight_regex ]]; then
new_spotlight_dependency="${BASH_REMATCH[1]}$new_version"
content="${content/${BASH_REMATCH[0]}/$new_spotlight_dependency}"
fi

echo "$content" >$build_gradle

# Regenerate Dart JNI bindings so they stay in sync with the updated Android SDK version
../scripts/generate-jni-bindings.sh "$new_version"
;;
*)
echo "Unknown argument $1"
Expand Down
12 changes: 10 additions & 2 deletions packages/flutter/test/native/android_envelope_sender_test.dart
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
export 'android_envelope_sender_test_real.dart'
if (dart.library.js_interop) 'android_envelope_sender_test_web.dart';
@TestOn('vm')
library;

import 'package:flutter_test/flutter_test.dart';

// ignore: unused_import
import 'android_envelope_sender_test_web.dart'
if (dart.library.io) 'android_envelope_sender_test_real.dart' as actual;

void main() => actual.main();
Loading
Loading