Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[in_app_purchase] Migrate to Billing to 5.0.0#5405

Merged
GaryQian merged 22 commits into
flutter-team-archive:mainfrom
GaryQian:iapbump
Jul 8, 2022
Merged

[in_app_purchase] Migrate to Billing to 5.0.0#5405
GaryQian merged 22 commits into
flutter-team-archive:mainfrom
GaryQian:iapbump

Conversation

@GaryQian

@GaryQian GaryQian commented Apr 26, 2022

Copy link
Copy Markdown
Contributor

Bumps the android dependency versions of in_app_purchase

Fixes flutter/flutter#88664

@GaryQian GaryQian requested a review from blasten as a code owner April 26, 2022 23:48
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'androidx.annotation:annotation:1.3.0'
implementation 'com.android.billingclient:billing:4.1.0'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will probably need more testing from our side, as well as exposing new APIs described in the changelog since 3.0.2

@GaryQian GaryQian changed the title [in_app_purchase] Upgrade build.gradle dependencies [in_app_purchase] Migrate to Billing to 4.1.0 May 3, 2022
@iapicca

iapicca commented May 30, 2022

Copy link
Copy Markdown
Contributor

directly Migrate to Google Play Billing Library 5.0 could make sense

@GaryQian

GaryQian commented May 31, 2022

Copy link
Copy Markdown
Contributor Author

Yes, The title needs to be changed, I am directly migrating to 5.0. 5.0 was released midway through my 4.1 migration implementation

@GaryQian

GaryQian commented Jun 9, 2022

Copy link
Copy Markdown
Contributor Author

Manually validated the billing flows with the example app. @blasten Ready for review

@stuartmorgan-g stuartmorgan-g removed the request for review from blasten July 6, 2022 14:07
@cyanglaz cyanglaz self-requested a review July 6, 2022 16:36
// `sku` was deprecated in billion 4.0, but we cannot directly remove it from our
// API instantly. Thus, for backwards compatibility, we pass the first sku here
// and include the rest of the list under `skus`.
if (!skus.isEmpty()) {

@cyanglaz cyanglaz Jul 6, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be easier to cleanup later if we put this logic to the dart side.
Then we don't have to cleanup the java code when we remove .sku.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, makes sense, I'll do that


/// The product ID of this purchase.
@JsonKey(defaultValue: '')
@Deprecated('Use skus instead')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we move the logic to dart, sku would be skus.first

@cyanglaz cyanglaz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % version updates

@GaryQian GaryQian requested a review from cyanglaz July 8, 2022 06:23
@GaryQian

GaryQian commented Jul 8, 2022

Copy link
Copy Markdown
Contributor Author

@cyanglaz Versioning and comments addressed. This needs a github "approve" to move forwards :) thanks!

required this.purchaseToken,
required this.signature,
required this.sku,
@Deprecated('Use skus instead') String? sku,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to update the shared plugin to use the new field instead. Should be in a new PR after this is published

@rguntha

rguntha commented Nov 17, 2022

Copy link
Copy Markdown

Please let us know when this pull is going to be merged. We urgently need to migrate to billing version 4.0. We can't push updates to our app without migrating to version 4.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[in_app_purchase] Migrate to Google Play Billing Library 4.0

5 participants