-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[in_app_purchase] Update Play Billing library to 7.1.1 #8218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
auto-submit
merged 33 commits into
flutter:main
from
leancodepl:feature/in-app-purchase-play-billing-upgrade
Jan 20, 2025
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
c23348b
Upgrade Play Billing library to 7.1.1
mchudy 0078d50
Remove proration mode references
mchudy ab5e118
Add InstallmentPlanDetails model
mchudy 2c6f0ee
Add installment plan details wrapper model
mchudy 4312cf7
Remove ProrationMode enum
mchudy ce29380
Update Android tests
mchudy dbc0161
Add PendingPurchaseUpdate model
mchudy cc9c473
Fix formatting
mchudy a67edf9
Adds support for pending prepaid plans
mchudy 3acbb0f
Fix CHANGELOG formatting
mchudy ac183c4
Add native tests and fix formatting
mchudy fbaa88c
Update CHANGELOG
mchudy a88dfdd
Update pubspec.yaml
mchudy 12ba75d
Update CHANGELOG and remove unnecessary ?
mchudy d1d33b0
Fix tests
mchudy 0234a7c
Update CHANGELOG
mchudy 58a9151
Revert CHANGELOG formatting change
mchudy e62c70c
CHANGELOG and comments nits
mchudy 0a926bc
Add docs links
mchudy 798d305
Rename PendingPurchasesParams to PlatformPendingPurchasesParams and m…
mchudy 5c89a99
Fix typo in class name
mchudy 682bb0e
Fix comments
mchudy a9c5677
Fix tests
mchudy 75b21e9
Fix formatting
mchudy e630285
Bump min Flutter SDK version for in_app_purchase
mchudy dc4425c
Remove JsonSerializable from PendingPurchasesParamsWrapper
mchudy b584ff2
Remove JSON serialization from other classes
mchudy e9d8907
Introduce Pigeon enums to avoid using hardcoded ints in Dart code
mchudy faec504
Bump in_app_purchase version
mchudy 9df2100
Fix formatting
mchudy 16df184
User patch version update
mchudy 7ab27c7
Remove json_serializable dependencies
mchudy ae5ccbd
Revert in_app_purchase changes
mchudy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are doing a breaking change, this seems like a good opportunity to rip out all the pre-Pigeon
JsonSerializable
code that was deprecated previously. @gmackall is there any reason not to include that here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a good idea, I have one question though. E.g.
BillingResponseConverter
was used to map from raw ints (Android defined constants) to public-facingBillingResponse
enum. Naive approach would be to introduce a new function inpigeon_converters.dart
:That looks a bit sketchy to me though as we have to deal with those hardcoded constants in Dart. Should we perhaps change the definition of
PlatformBillingResult
in Pigeon contract and introduce a newPlatformBillingResponse
enum as part of this refactoring? If the mapping is performed on Java side we can refer to constants defined in the library so the code is more maintainable. Correct me if I'm wrong please.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's definitely what we want to do. The fact that we are still using
BillingResponseConverter().fromJson
inpigeon_converters.dart
was a mistake on my part; I did an initial shallow conversion from manual method channels to Pigeon and then went back and converted objects more deeply to Pigeon structures in follow-ups, but missed this. We strongly prefer the clarity and safety of doing a Java constant -> Pigeon enum conversion in Java, then Pigeon enum -> Dart enum conversion in Dart, even though doing so is more verbose.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I refactored this and introduced new enums in Pigeon contracts. I also noticed that the representation of https://developer.android.com/reference/com/android/billingclient/api/BillingClient.FeatureType was very outdated so I made it match the current API. As it removes two variants it's another breaking changes, but I think it would be good to include this with those other breaking changes.