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
9 changes: 1 addition & 8 deletions .github/workflows/embrace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,6 @@ jobs:
uses: actions/checkout@v6
with:
persist-credentials: false
- name: 🖋 Override Embrace packages with local versions
run: |
sed -i 'pubspec.yaml' -e 's/embrace_platform_interface:.*/embrace_platform_interface:\n path: ..\/embrace_platform_interface/'
sed -i 'pubspec.yaml' -e 's/embrace_android:.*/embrace_android:\n path: ..\/embrace_android/'
sed -i 'pubspec.yaml' -e 's/embrace_ios:.*/embrace_ios:\n path: ..\/embrace_ios/'
sed -i '../embrace_ios/pubspec.yaml' -e 's/embrace_platform_interface:.*/embrace_platform_interface:\n path: ..\/embrace_platform_interface/'
sed -i '../embrace_android/pubspec.yaml' -e 's/embrace_platform_interface:.*/embrace_platform_interface:\n path: ..\/embrace_platform_interface/'
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e
with:
Expand All @@ -290,7 +283,7 @@ jobs:
run: flutter pub global activate pana
- name: 📊 Verify Pana Score
run: |
PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
PANA=$(pana . --no-warning --dartdoc-version 8.3.4); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
echo "Score: $PANA_SCORE"
IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=${SCORE_ARR[0]}
if (( SCORE < 140 )); then echo "The minimum score of 140 was not met!"; exit 1; fi
2 changes: 1 addition & 1 deletion .github/workflows/embrace_android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
uses: ./.github/workflows/flutter_ci.yaml
with:
flutter_channel: stable
flutter_version: "3.3.1"
flutter_version: "3.38.5"
working_directory: embrace_android
2 changes: 1 addition & 1 deletion .github/workflows/embrace_dio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
uses: ./.github/workflows/flutter_ci.yaml
with:
flutter_channel: stable
flutter_version: "3.22.0"
flutter_version: "3.38.5"
working_directory: embrace_dio
2 changes: 1 addition & 1 deletion .github/workflows/embrace_ios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
uses: ./.github/workflows/flutter_ci.yaml
with:
flutter_channel: stable
flutter_version: "3.3.1"
flutter_version: "3.38.5"
working_directory: embrace_ios
2 changes: 1 addition & 1 deletion .github/workflows/embrace_platform_interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
uses: ./.github/workflows/flutter_ci.yaml
with:
flutter_channel: stable
flutter_version: "3.3.1"
flutter_version: "3.38.5"
working_directory: embrace_platform_interface
2 changes: 1 addition & 1 deletion embrace_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Android implementation of the embrace plugin as defined by the embr
version: 4.3.0
homepage: https://embrace.io
environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"
flutter: ">=2.0.0"
flutter:
plugin:
Expand Down
2 changes: 1 addition & 1 deletion embrace_android/test/embrace_android_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void main() {
embrace = EmbraceAndroid();

log = <MethodCall>[];
TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(embrace.methodChannel, (methodCall) async {
log.add(methodCall);
switch (methodCall.method) {
Expand Down
2 changes: 1 addition & 1 deletion embrace_ios/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: iOS implementation of the embrace plugin as defined by the embrace_
version: 4.3.0
homepage: https://embrace.io
environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"
flutter: ">=2.0.0"
flutter:
plugin:
Expand Down
2 changes: 1 addition & 1 deletion embrace_ios/test/embrace_ios_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void main() {
embrace = EmbraceIOS();

log = <MethodCall>[];
TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(embrace.methodChannel, (methodCall) async {
log.add(methodCall);
switch (methodCall.method) {
Expand Down
6 changes: 3 additions & 3 deletions embrace_platform_interface/lib/method_channel_embrace.dart
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class MethodChannelEmbrace extends EmbracePlatform {
_messageIdArgName: messageId,
_priorityArgName: priority,
_hasNotificationArgName: hasNotification,
_hasDataArgName: hasData
_hasDataArgName: hasData,
});
}

Expand Down Expand Up @@ -557,7 +557,7 @@ class MethodChannelEmbrace extends EmbracePlatform {
_spanIdArgName: spanId,
_nameArgName: name,
_timestampMsArgName: timestampMs,
_attributesArgName: attributes
_attributesArgName: attributes,
}) as bool;
}

Expand All @@ -567,7 +567,7 @@ class MethodChannelEmbrace extends EmbracePlatform {
return await methodChannel.invokeMethod(_addSpanAttributeMethodName, {
_spanIdArgName: spanId,
_keyArgName: key,
_valueArgName: value
_valueArgName: value,
}) as bool;
}

Expand Down
2 changes: 1 addition & 1 deletion embrace_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A common platform interface for the Embrace plugin that enables pla
version: 4.3.0
homepage: https://embrace.io
environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"
flutter: ">=2.0.0"
dependencies:
build_runner: ^2.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ void main() {
version: dartVersion,
operatingSystem: Platform.android,
),
)..methodChannel.setMockMethodCallHandler((MethodCall methodCall) async {
);
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(
methodChannelEmbrace.methodChannel,
(MethodCall methodCall) async {
log.add(methodCall);
switch (methodCall.method) {
case 'getDeviceId':
Expand All @@ -42,7 +46,8 @@ void main() {
default:
return null;
}
});
},
);
});

tearDown(log.clear);
Expand Down Expand Up @@ -71,10 +76,13 @@ void main() {
});

test('returns false if platform returns null', () async {
methodChannelEmbrace.methodChannel
.setMockMethodCallHandler((MethodCall methodCall) async {
return null;
});
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(
methodChannelEmbrace.methodChannel,
(MethodCall methodCall) async {
return null;
},
);

expect(
await methodChannelEmbrace.attachToHostSdk(
Expand Down Expand Up @@ -1205,7 +1213,7 @@ void main() {
const parentSpanId = '__parentSpanId__';
const attributes = {'key': 'value'};
const events = [
{'key': 'value'}
{'key': 'value'},
];

test('invokes recordCompletedSpan method in the method channel',
Expand Down