Repository navigation
fix(flutter,react-native): move the embedded Android Push code to its own package - #2051
Merged
Merged
Conversation
… own package The Flutter plugin and the React Native module embedded the Android SDK's Push classes under io.appwrite.services and io.appwrite.exceptions, so an app depending on two of the three SDKs failed with duplicate classes and colliding manifest components. The embedded copies now live under io.appwrite.flutter and io.appwrite.reactnative, with their own broadcast actions and notification-icon meta-data key. The Android SDK keeps its packages.
3 tasks
🟢 Tier S · Ready to mergeThe generator now emits embedded Flutter and React Native Android Push classes, manifest components, broadcast actions, and notification metadata under SDK-specific packages, while leaving the Android SDK package unchanged. Bridge imports and README examples follow those package names, and generation and end-to-end tests cover collisions and native Push behavior. Latest changes: The newest commits update the Flutter and React Native Android e2e harnesses to copy their new package trees and use the corresponding service imports and broadcast actions.
📂 Walkthrough · 20
Merged |
…ve e2e The Robolectric projects copied the plugin's Android sources from io/appwrite/services and io/appwrite/exceptions, and imported and broadcast with the old package names.
…kages # Conflicts: # tests/generation/GenerationTest.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Flutter plugin and the React Native module embed the Android Push code under the Android SDK's own packages. An app that depends on two of the three SDKs fails to build, and the merged manifest declares the same components twice:
The embedded copies now use the plugin packages each SDK already has. The Android SDK keeps its packages, and its output is byte-identical to
main.io.appwrite.services,io.appwrite.exceptionsio.appwrite.flutter.services,io.appwrite.flutter.exceptionsio.appwrite.reactnative.services,io.appwrite.reactnative.exceptionspushNamespacein the shared templates follows the language (io.<title>.<language>outside Android). That also gives each copy its own broadcast actions and notification-icon meta-data key (io.appwrite.flutter.push.notification_icon), and the READMEs say so.Fully qualified classes shared between the generated trees (2.5.x client spec):
The plugin's Android code compiles in a Flutter app (
classes.jar: 35 classes, all underio/appwrite/flutter, none shared with the Android library's 316).testEmbeddedAndroidPushClassesDoNotCollidefails onmainwith the duplicate list and passes here.Closes #2053