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] <support@github.com>
This commit is contained in:
parent
d879c27e3a
commit
1503f89357
6 changed files with 29 additions and 48 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -135,20 +135,6 @@
|
|||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<receiver android:name="org.unifiedpush.flutter.connector.UnifiedPushReceiver"
|
||||
tools:replace="android:enabled"
|
||||
android:enabled="false">
|
||||
</receiver>
|
||||
|
||||
<receiver android:exported="false" android:enabled="true" android:name=".UnifiedPushReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="org.unifiedpush.flutter.connector.MESSAGE"/>
|
||||
<action android:name="org.unifiedpush.flutter.connector.UNREGISTERED"/>
|
||||
<action android:name="org.unifiedpush.flutter.connector.NEW_ENDPOINT"/>
|
||||
<action android:name="org.unifiedpush.flutter.connector.REGISTRATION_FAILED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
package chat.fluffy.fluffychat
|
||||
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.embedding.engine.dart.DartExecutor
|
||||
import org.unifiedpush.flutter.connector.UnifiedPushReceiver
|
||||
|
||||
import android.content.Context
|
||||
|
||||
class UnifiedPushReceiver : UnifiedPushReceiver() {
|
||||
override fun getEngine(context: Context): FlutterEngine {
|
||||
var engine = MainActivity.engine
|
||||
if (engine == null) {
|
||||
engine = MainActivity.provideEngine(context)
|
||||
engine.localizationPlugin.sendLocalesToFlutter(
|
||||
context.resources.configuration
|
||||
)
|
||||
engine.dartExecutor.executeDartEntrypoint(
|
||||
DartExecutor.DartEntrypoint.createDefault()
|
||||
)
|
||||
}
|
||||
return engine
|
||||
}
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ class BackgroundPush {
|
|||
if (Platform.isAndroid) {
|
||||
await UnifiedPush.initialize(
|
||||
onNewEndpoint: _newUpEndpoint,
|
||||
onRegistrationFailed: _upUnregistered,
|
||||
onRegistrationFailed: (_, i) => _upUnregistered(i),
|
||||
onUnregistered: _upUnregistered,
|
||||
onMessage: _onUpMessage,
|
||||
);
|
||||
|
|
@ -352,7 +352,8 @@ class BackgroundPush {
|
|||
.registerAppWithDialog();
|
||||
}
|
||||
|
||||
Future<void> _newUpEndpoint(String newEndpoint, String i) async {
|
||||
Future<void> _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<void> _onUpMessage(Uint8List message, String i) async {
|
||||
Future<void> _onUpMessage(PushMessage pushMessage, String i) async {
|
||||
final message = pushMessage.content;
|
||||
upAction = true;
|
||||
final data = Map<String, dynamic>.from(
|
||||
json.decode(utf8.decode(message))['notification'],
|
||||
|
|
@ -446,7 +448,7 @@ class UPFunctions extends UnifiedPushFunctions {
|
|||
|
||||
@override
|
||||
Future<void> registerApp(String instance) async {
|
||||
await UnifiedPush.registerApp(instance, features);
|
||||
await UnifiedPush.register(instance: instance, features: features);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
12
pubspec.lock
12
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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue