Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6fcd45f
draft
marandaneto Nov 3, 2020
4077a7b
fix conflict
marandaneto Nov 3, 2020
9fd04ba
set staging if not release mode
marandaneto Nov 3, 2020
d748ec4
clean up
marandaneto Nov 3, 2020
84d9559
Update flutter/lib/sentry_flutter.dart
marandaneto Nov 3, 2020
103bded
remove comment
marandaneto Nov 3, 2020
0a999f3
set flutter sdk on options
marandaneto Nov 4, 2020
b6e4967
Merge branch 'main' into feat/flutter-native
marandaneto Nov 4, 2020
319f89d
Merge branch 'feat/flutter-native' of github.com:getsentry/sentry-dar…
marandaneto Nov 4, 2020
d26c716
draft
marandaneto Nov 4, 2020
9b250b3
remove
marandaneto Nov 4, 2020
59f7ea7
fix
marandaneto Nov 4, 2020
9133a3e
init native sdk draft
marandaneto Nov 5, 2020
c96db31
write envelope
marandaneto Nov 5, 2020
1a2c2f3
stack trace fixes
marandaneto Nov 5, 2020
6242992
fixes
marandaneto Nov 6, 2020
eaad8ef
upgrade versions
marandaneto Nov 6, 2020
93517d4
fix
marandaneto Nov 6, 2020
e5aab67
bump android
marandaneto Nov 6, 2020
6d7821d
fix git conflict
marandaneto Nov 10, 2020
f8bd11d
fix tests
marandaneto Nov 10, 2020
3d7055a
fixes
marandaneto Nov 10, 2020
25edde3
fix
marandaneto Nov 10, 2020
81ddf3e
clean up
marandaneto Nov 10, 2020
a16e4a1
ref
marandaneto Nov 10, 2020
d879c50
debug
marandaneto Nov 11, 2020
a860ee3
fix
marandaneto Nov 11, 2020
7562bf4
Merge remote-tracking branch 'origin/main' into feat/flutter-native
rxlabz Nov 12, 2020
1bd8324
post conflict dartformt
rxlabz Nov 12, 2020
27b8ee9
fix import
rxlabz Nov 12, 2020
e48f974
fix: android native integration (#163)
marandaneto Nov 17, 2020
158c963
Fix: Handled mechanism is true and fix samples (#165)
marandaneto Nov 18, 2020
4486897
Fix: Flutter Web does not require a native integration (#166)
marandaneto Nov 18, 2020
0d13722
Tests: unit tests for the native integrations (#167)
marandaneto Nov 19, 2020
8c073bf
Ref: remove lock files (#168)
marandaneto Nov 20, 2020
bcfcc07
Fix: set Dart and Flutter min version (#170)
marandaneto Nov 20, 2020
457435b
Fix: read system variables for mobile too (#169)
marandaneto Nov 20, 2020
b75d9d4
Fix: README on Dart and Flutter SDKs (#171)
marandaneto Nov 20, 2020
c05fcbf
flutter native ios (#161)
rxlabz Nov 20, 2020
e34fd3c
Fix: CHANGELOG for sentry and sentry_flutter (#173)
marandaneto Nov 20, 2020
f8d38d8
Fix: Changelog and READMEs (#174)
marandaneto Nov 20, 2020
07b462c
fix readme
marandaneto Nov 20, 2020
eed57c0
add known limitations section
marandaneto Nov 20, 2020
960946b
remove deadcode
marandaneto Nov 20, 2020
9d4a7c8
Fix: flutter versioniong and its dependency version (#172)
marandaneto Nov 20, 2020
b199361
hack pass CI
marandaneto Nov 20, 2020
f36fb53
fix main.dart example and update readme (#176)
rxlabz Nov 20, 2020
8ea9a69
Ref: create a export file for sentry_flutter (#175)
marandaneto Nov 20, 2020
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
Prev Previous commit
Next Next commit
clean up
  • Loading branch information
marandaneto committed Nov 10, 2020
commit 81ddf3e39583d04d02dc8e347ae73601885c6055
7 changes: 0 additions & 7 deletions dart/lib/src/scope.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,6 @@ class Scope {
if (_options == null) {
throw ArgumentError('SentryOptions is required');
}
_addDefaultTags();
}

/// Adds default tags to the Scope
void _addDefaultTags() {
// TODO: maybe this should be a field on options with default values?
// _tags['flutter_web'] = isWeb.toString();
}

/// Adds a breadcrumb to the breadcrumbs queue
Expand Down
2 changes: 0 additions & 2 deletions flutter/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
org.gradle.jvmargs=-Xmx1536M
#android.useAndroidX=true
#android.enableJetifier=true
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import io.sentry.SentryLevel
import io.sentry.SentryOptions
import io.sentry.protocol.SdkVersion
import java.io.File
import java.util.*
import java.util.UUID
import java.util.Locale

// TODO: maybe this should be done in Java, to avoid stdlib
// libflutter.so is already 11mb each archie
Expand Down
17 changes: 1 addition & 16 deletions flutter/example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,7 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- In order to capture crashes caused by the native layer early during Init.
This is relevant for errors that happen before Flutter runs far enough to run init -->
<!-- <meta-data-->
<!-- android:name="io.sentry.dsn"-->
<!-- android:value="https://[email protected]/2078115" />-->
<!-- <meta-data -->
<!-- android:name="io.sentry.debug"-->
<!-- android:value="true" />-->
<!-- Will be enabled by default from version 3.0 -->
<!-- <meta-data-->
<!-- android:name="io.sentry.session-tracking.enable"-->
<!-- android:value="true" />-->
<!-- To quickly demonstrate the ANR capture. Default is 5 seconds. -->
<!-- <meta-data-->
<!-- android:name="io.sentry.anr.timeout-interval-mills"-->
<!-- android:value="2000" />-->

<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
Expand Down
2 changes: 1 addition & 1 deletion flutter/example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {

dependencies {
classpath 'io.sentry:sentry-android-gradle-plugin:1.7.36'
classpath 'com.android.tools.build:gradle:3.6.4'
classpath 'com.android.tools.build:gradle:4.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.ydq.android.gradle.build.tool:nativeBundle:1.0.6'
}
Expand Down
20 changes: 17 additions & 3 deletions flutter/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety.1"
matcher:
dependency: transitive
description:
Expand All @@ -106,7 +113,14 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.4"
package_info:
dependency: transitive
description:
name: package_info
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.3+2"
path:
dependency: transitive
description:
Expand Down Expand Up @@ -153,7 +167,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.2"
stream_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -211,5 +225,5 @@ packages:
source: hosted
version: "2.1.0-nullsafety.3"
sdks:
dart: ">=2.10.0-110 <2.11.0"
dart: ">=2.10.0-110 <=2.11.0-213.1.beta"
flutter: ">=1.17.0 <2.0.0"
21 changes: 13 additions & 8 deletions flutter/lib/FileSystemTransport.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import 'dart:convert';

import 'package:flutter/services.dart';
import 'package:sentry/sentry.dart';
import 'dart:convert';

class FileSystemTransport implements Transport {
FileSystemTransport(this._channel, this._options);

final MethodChannel _channel;
final SentryOptions _options;

final _jsonEncoder = const JsonEncoder();

FileSystemTransport(this._channel, this._options);

@override
Future<SentryId> send(SentryEvent event) async {
final headerMap = {
Expand All @@ -23,19 +24,23 @@ class FileSystemTransport implements Transport {
final itemHeaderMap = {
'content_type': 'application/json',
'type': event.type,
// TODO: real length in String
'length': eventString.length,
};

final headerString = _jsonEncoder.convert(headerMap);
final itemHeaderString = _jsonEncoder.convert(itemHeaderMap);
final envelopeString = '$headerString\n$itemHeaderString\n$eventString';

// await _channel.invokeMethod('captureEnvelope', <String, dynamic>{
// 'event': envelopeString,
// });
final args = [envelopeString];
await _channel.invokeMethod('captureEnvelope', args);
try {
await _channel.invokeMethod('captureEnvelope', args);
} catch (error) {
_options.logger(
SentryLevel.error,
'Failed to save envelope: $error',
);
return SentryId.empty();
}

return event.eventId;
}
Expand Down
2 changes: 1 addition & 1 deletion flutter/lib/default_integrations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Integration nativeSdkIntegration(SentryOptions options, MethodChannel channel) {
} catch (error) {
options.logger(
SentryLevel.error,
'nativeSdkIntegration failed to be installed: ${error.toString()}',
'nativeSdkIntegration failed to be installed: $error',
);
}
}
Expand Down
3 changes: 0 additions & 3 deletions flutter/lib/sentry_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ mixin SentryFlutter {
// our plugin can call into the native code.
WidgetsFlutterBinding.ensureInitialized();

// TODO: we could read the window and add some stuff on contexts
// final window = WidgetsBinding.instance.window;

options.debug = kDebugMode;

// web still uses a http transport
Expand Down
22 changes: 18 additions & 4 deletions flutter/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety.1"
matcher:
dependency: transitive
description:
Expand All @@ -106,7 +113,14 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.4"
package_info:
dependency: "direct main"
description:
name: package_info
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.3+2"
path:
dependency: transitive
description:
Expand All @@ -127,7 +141,7 @@ packages:
path: "../dart"
relative: true
source: path
version: "4.0.0"
version: "4.0.0-alpha.2"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -146,7 +160,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.2"
stream_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -197,5 +211,5 @@ packages:
source: hosted
version: "2.1.0-nullsafety.3"
sdks:
dart: ">=2.10.0-110 <2.11.0"
dart: ">=2.10.0-110 <=2.11.0-213.1.beta"
flutter: ">=1.17.0 <2.0.0"
1 change: 0 additions & 1 deletion flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dependencies:
sdk: flutter
sentry: #^4.0.0 uncomment before publishing
path: ../dart
#device_info: ^1.0.0
package_info: ^0.4.0

dev_dependencies:
Expand Down