From 1811b0aaa5f7ebdfad6b82b92f84a869d16a8e63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 14:45:29 +0000 Subject: [PATCH 1/3] Bump natiginfo/action-detekt-all from 1.21.0 to 1.23.1 Bumps [natiginfo/action-detekt-all](https://github.com/natiginfo/action-detekt-all) from 1.21.0 to 1.23.1. - [Release notes](https://github.com/natiginfo/action-detekt-all/releases) - [Commits](https://github.com/natiginfo/action-detekt-all/compare/e01de6ff0eef7c24131e8a133bf598cfac6ceeab...be3c18799c7c392b2f41a674beed9ced7ae2f21b) --- updated-dependencies: - dependency-name: natiginfo/action-detekt-all dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/flutter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index 68237980f7..92aad8025b 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -198,6 +198,6 @@ jobs: steps: - uses: actions/checkout@v3 # To recreate baseline run: detekt -i flutter/android,flutter/example/android -b flutter/config/detekt-bl.xml -cb - - uses: natiginfo/action-detekt-all@e01de6ff0eef7c24131e8a133bf598cfac6ceeab # pin@1.21.0 + - uses: natiginfo/action-detekt-all@be3c18799c7c392b2f41a674beed9ced7ae2f21b # pin@1.23.1 with: args: -i flutter/android,flutter/example/android --baseline flutter/config/detekt-bl.xml --jvm-target 1.8 --build-upon-default-config --all-rules From e5312924b13f9cbf27da936d473701f498a43db9 Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Fri, 3 Nov 2023 10:43:47 +0100 Subject: [PATCH 2/3] fix braces --- .../io/sentry/samples/flutter/MainActivity.kt | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/flutter/example/android/app/src/main/kotlin/io/sentry/samples/flutter/MainActivity.kt b/flutter/example/android/app/src/main/kotlin/io/sentry/samples/flutter/MainActivity.kt index 14f222d254..eed6695b0a 100644 --- a/flutter/example/android/app/src/main/kotlin/io/sentry/samples/flutter/MainActivity.kt +++ b/flutter/example/android/app/src/main/kotlin/io/sentry/samples/flutter/MainActivity.kt @@ -11,37 +11,33 @@ class MainActivity : FlutterActivity() { override fun configureFlutterEngine(flutterEngine: FlutterEngine) { super.configureFlutterEngine(flutterEngine) - MethodChannel(flutterEngine.dartExecutor.binaryMessenger, _channel).setMethodCallHandler { - call, result -> + MethodChannel( + flutterEngine.dartExecutor.binaryMessenger, + _channel + ).setMethodCallHandler { call, result -> // Note: this method is invoked on the main thread. when (call.method) { - "throw" -> { + "throw" -> thread(isDaemon = true) { throw Exception("Catch this java exception thrown from Kotlin thread!") } - } - "anr" -> { - Thread.sleep(6_000) - } - "capture" -> { + + "anr" -> Thread.sleep(6_000) + + "capture" -> try { throw RuntimeException("Catch this java exception!") } catch (e: Exception) { Sentry.captureException(e) } - } - "crash" -> { - crash() - } - "cpp_capture_message" -> { - message() - } - "platform_exception" -> { - throw RuntimeException("Catch this platform exception!") - } - else -> { - result.notImplemented() - } + + "crash" -> crash() + + "cpp_capture_message" -> message() + + "platform_exception" -> throw RuntimeException("Catch this platform exception!") + + else -> result.notImplemented() } result.success("") } From 96aa27a3d274c9a3bcd7c9c28cbfdb8094b91e7d Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Mon, 13 Nov 2023 12:48:55 +0100 Subject: [PATCH 3/3] Add missing trailing comma --- .../src/main/kotlin/io/sentry/samples/flutter/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter/example/android/app/src/main/kotlin/io/sentry/samples/flutter/MainActivity.kt b/flutter/example/android/app/src/main/kotlin/io/sentry/samples/flutter/MainActivity.kt index eed6695b0a..7966a33655 100644 --- a/flutter/example/android/app/src/main/kotlin/io/sentry/samples/flutter/MainActivity.kt +++ b/flutter/example/android/app/src/main/kotlin/io/sentry/samples/flutter/MainActivity.kt @@ -13,7 +13,7 @@ class MainActivity : FlutterActivity() { super.configureFlutterEngine(flutterEngine) MethodChannel( flutterEngine.dartExecutor.binaryMessenger, - _channel + _channel, ).setMethodCallHandler { call, result -> // Note: this method is invoked on the main thread. when (call.method) {