Skip to content

[BC5] AmazonStoreProduct updates#881

Merged
joshdholtz merged 54 commits into
bc5-supportfrom
amazon-store-product
Mar 21, 2023
Merged

[BC5] AmazonStoreProduct updates#881
joshdholtz merged 54 commits into
bc5-supportfrom
amazon-store-product

Conversation

@beylmk

@beylmk beylmk commented Mar 16, 2023

Copy link
Copy Markdown
Contributor

Motiviation

https://revenuecats.atlassian.net/browse/CF-1197 - AmazonStoreProduct updates
https://revenuecats.atlassian.net/browse/CF-1199 - Update purchase tester for amazon
https://revenuecats.atlassian.net/browse/CF-1217 - Remove isProductChange for amazon
https://revenuecats.atlassian.net/browse/CF-1288 - Add Period to AmazonStoreProduct for subscription and free trial

Description

  • AmazonStoreProduct and AmazonPurchasingData have their own files now
  • Deprecated sku on AmazonStoreProduct
  • Removed LockedFeature.AmazonStore
  • Added/updated a bunch of tests
  • Adds AmazonStoreProduct to API Tester
    • This means that the :feature:amazon module was added
  • New build_purchase_tester lane in the Fastfile for building an APK for Amazon
    • This is similar to build_magic_weather
    • Tried to put it in the same lane at first but it got very complicated and messy

TODO:

  • api testers
  • update docs

Maddie Beyl added 30 commits February 17, 2023 10:11
# Conflicts:
#	common/src/test/java/com/revenuecat/purchases/common/OfferingsTest.kt
#	purchases/src/main/kotlin/com/revenuecat/purchases/Purchases.kt
# Conflicts:
#	common/src/main/java/com/revenuecat/purchases/common/OfferingFactories.kt
#	feature/amazon/src/main/java/com/revenuecat/purchases/amazon/storeProductConversions.kt
# Conflicts:
#	feature/amazon/src/main/java/com/revenuecat/purchases/amazon/storeProductConversions.kt
Base automatically changed from offering-factory to bc5-support March 16, 2023 20:40
Maddie Beyl added 4 commits March 17, 2023 10:06
# Conflicts:
#	feature/amazon/src/main/java/com/revenuecat/purchases/amazon/storeProductConversions.kt
@codecov

codecov Bot commented Mar 17, 2023

Copy link
Copy Markdown

Codecov Report

Merging #881 (90f0f74) into bc5-support (16a6e1c) will increase coverage by 0.04%.
The diff coverage is 70.58%.

❗ Current head 90f0f74 differs from pull request most recent head 180892a. Consider uploading reports for the commit 180892a to get more accurate results

@@               Coverage Diff               @@
##           bc5-support     #881      +/-   ##
===============================================
+ Coverage        84.04%   84.09%   +0.04%     
===============================================
  Files              153      155       +2     
  Lines             5366     5382      +16     
  Branches           758      763       +5     
===============================================
+ Hits              4510     4526      +16     
+ Misses             566      565       -1     
- Partials           290      291       +1     
Impacted Files Coverage Δ
...evenuecat/purchases/amazon/AmazonPurchasingData.kt 0.00% <0.00%> (ø)
...otlin/com/revenuecat/purchases/FeatureLockUtils.kt 100.00% <ø> (ø)
.../main/kotlin/com/revenuecat/purchases/Purchases.kt 85.20% <ø> (+0.04%) ⬆️
...ava/com/revenuecat/purchases/utils/productStubs.kt 78.57% <54.54%> (-3.63%) ⬇️
.../revenuecat/purchases/amazon/AmazonStoreProduct.kt 80.00% <80.00%> (ø)
...nuecat/purchases/amazon/storeProductConversions.kt 92.30% <90.00%> (+6.82%) ⬆️

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@joshdholtz joshdholtz changed the title AmazonStoreProduct updates [BC5] AmazonStoreProduct updates Mar 20, 2023
@joshdholtz joshdholtz marked this pull request as ready for review March 20, 2023 16:30
@joshdholtz joshdholtz requested review from a team and vegaro March 20, 2023 16:30
Comment thread api-tester/src/main/java/com/revenuecat/apitester/java/StoreProductAPI.java Outdated
Comment thread api-tester/src/main/java/com/revenuecat/apitester/kotlin/StoreProductAPI.kt Outdated
dataStoreUtils.getSdkConfig().onEach { sdkConfiguration ->
isPlayStore = !sdkConfiguration.useAmazon
}.collect()
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ohhh coroutines

Comment thread fastlane/Fastfile Outdated
Comment thread feature/amazon/src/test/java/com/revenuecat/purchases/amazon/helpers/dummies.kt Outdated
android:text="@string/subscription_options"
android:textStyle="bold"
android:visibility="@{isSubscription ? View.VISIBLE : View.GONE}"
android:visibility="@{isSubscription &amp; isPlayStore ? View.VISIBLE : View.GONE}"

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.

SHouldn't this be using && instead of &amp; "@{isSubscription && isPlayStore ? View.VISIBLE : View.GONE}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, I think it should actually be &amp;&amp; 🤔 We can't put && directly in because its XML and it yells at us but it should be two &amp; instead of one

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.

yup, would have been the binary operator otherwise. thanks for fixing it. i thought xml would at least allow literal & in attributes, but doesn't look like it either

Comment thread fastlane/Fastfile
Comment on lines 243 to +245
sh("git reset --hard")
sh("git clean -fd")
sh("cd .. && git clean -fd")
end

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.

So this resets the repo at the current dir and cleans the one in the parent? Is this correct?
Also maybe you can use git -C .. clean -fg instead of doing cd

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like it should also work 😁 I can change it to that!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yesss, this needed to be its own file 💪

Comment thread fastlane/Fastfile Outdated
@joshdholtz joshdholtz merged commit 017bb3e into bc5-support Mar 21, 2023
@joshdholtz joshdholtz deleted the amazon-store-product branch March 21, 2023 14:45
@joshdholtz joshdholtz mentioned this pull request Mar 23, 2023
joshdholtz added a commit that referenced this pull request Mar 23, 2023
### Breaking Changes
* Rename `introTrial` to `introOffer` on `SubscriptionOptions` (#890)
via Josh Holtz (@joshdholtz)
* Use `rc-ignore-offer` instead of `rc-ignore-befault-offer` (#889) via
Josh Holtz (@joshdholtz)
* AmazonStoreProduct updates (#881) via beylmk (@beylmk)
* Remove Parcelable implementation for classes with ProductDetails as a
member (#866) via beylmk (@beylmk)
* Make Activity first param in PurchaseParams (#882) via Josh Holtz
(@joshdholtz)
### New Features
* Re-enable `observerMode` and `syncPurchases()` (#878) via Josh Holtz
(@joshdholtz)
### Bugfixes
* Re-add `price_string` header on postReceipt (#879) via Josh Holtz
(@joshdholtz)
### Other Changes
* Cleaning up some TODOs in the code (#883) via Josh Holtz (@joshdholtz)
* Amazon Offering Parsing (#824) via beylmk (@beylmk)
* Merge main ->  bc5-support 2023-03-15 (#875) via Toni Rico (@tonidero)
* Fix purchase tester navigation (#871) via beylmk (@beylmk)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:breaking Changes that are breaking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants