From 1503f893570592237fb3b03c47d44130e4e859fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 00:19:17 +0000 Subject: [PATCH] build: (deps): bump unifiedpush from 5.0.2 to 6.0.2 Bumps unifiedpush from 5.0.2 to 6.0.2. --- updated-dependencies: - dependency-name: unifiedpush dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- android/app/build.gradle.kts | 16 +++++++++++++ android/app/src/main/AndroidManifest.xml | 14 ----------- .../fluffy/fluffychat/UnifiedPushService.kt | 23 ------------------- lib/utils/background_push.dart | 10 ++++---- pubspec.lock | 12 +++++----- pubspec.yaml | 2 +- 6 files changed, 29 insertions(+), 48 deletions(-) delete mode 100644 android/app/src/main/kotlin/chat/fluffy/fluffychat/UnifiedPushService.kt diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 12375cbae..bd06a98f7 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -16,6 +16,22 @@ dependencies { coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4") // For flutter_local_notifications // Workaround for: https://github.com/MaikuB/flutter_local_notifications/issues/2286 } + +// Workaround for https://pub.dev/packages/unifiedpush#the-build-fails-because-of-duplicate-classes +configurations.all { + // Use the latest version published: https://central.sonatype.com/artifact/com.google.crypto.tink/tink-android + val tink = "com.google.crypto.tink:tink-android:1.17.0" + // You can also use the library declaration catalog + // val tink = libs.google.tink + resolutionStrategy { + force(tink) + dependencySubstitution { + substitute(module("com.google.crypto.tink:tink")).using(module(tink)) + } + } +} + + android { namespace = "chat.fluffy.fluffychat" compileSdk = flutter.compileSdkVersion diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 179341983..167602f73 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -135,20 +135,6 @@ - - - - - - - - - - - - _upUnregistered(i), onUnregistered: _upUnregistered, onMessage: _onUpMessage, ); @@ -352,7 +352,8 @@ class BackgroundPush { .registerAppWithDialog(); } - Future _newUpEndpoint(String newEndpoint, String i) async { + Future _newUpEndpoint(PushEndpoint newPushEndpoint, String i) async { + final newEndpoint = newPushEndpoint.url; upAction = true; if (newEndpoint.isEmpty) { await _upUnregistered(i); @@ -412,7 +413,8 @@ class BackgroundPush { } } - Future _onUpMessage(Uint8List message, String i) async { + Future _onUpMessage(PushMessage pushMessage, String i) async { + final message = pushMessage.content; upAction = true; final data = Map.from( json.decode(utf8.decode(message))['notification'], @@ -446,7 +448,7 @@ class UPFunctions extends UnifiedPushFunctions { @override Future registerApp(String instance) async { - await UnifiedPush.registerApp(instance, features); + await UnifiedPush.register(instance: instance, features: features); } @override diff --git a/pubspec.lock b/pubspec.lock index 161ae9c88..df6893e54 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -2005,26 +2005,26 @@ packages: dependency: "direct main" description: name: unifiedpush - sha256: "6dbed5a6305ca33f1865c7a3d814ae39476b79a2d23ca76a5708f023f405730f" + sha256: "1418375efb580af9640de4eaf4209cb6481f9a48792648ced3051f30e67d9568" url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "6.0.2" unifiedpush_android: dependency: transitive description: name: unifiedpush_android - sha256: "7443dece0a850ae956514f809983eb2b39fc518c2c7d24dbfe817198bec89134" + sha256: "2f25db8eb2fc3183bf2e43db89fff20b2587adc1c361e1d1e06b223a0d45b50a" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "3.1.1" unifiedpush_platform_interface: dependency: transitive description: name: unifiedpush_platform_interface - sha256: dd588d78a8b2bfc10430e30035526e98caa543d0b7364a6344b5eb4815721c6d + sha256: bb49d2748211520e35e0374ab816faa8a2c635267e71909d334ad868d532eba5 url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "3.0.1" unifiedpush_ui: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 25dc46a5f..7761490b8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -80,7 +80,7 @@ dependencies: sqlcipher_flutter_libs: ^0.6.7 swipe_to_action: ^0.3.0 tor_detector_web: ^1.1.0 - unifiedpush: ^5.0.1 + unifiedpush: ^6.0.2 unifiedpush_ui: ^0.1.0 universal_html: ^2.2.4 url_launcher: ^6.3.2