Skip to content

Migrate amazon & debugview modules to KTS #2327

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

skydoves
Copy link
Member

@skydoves skydoves commented Apr 4, 2025

Motivation

@skydoves skydoves requested a review from a team April 4, 2025 00:26
@skydoves skydoves self-assigned this Apr 4, 2025
Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

:shipit:

@@ -25,12 +25,6 @@ android {
}
}

project.afterEvaluate {
// Remove afterEvaluate
// after https://github.com/Kotlin/kotlinx-kover/issues/362 is fixed
Copy link
Contributor

Choose a reason for hiding this comment

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

🙌

Copy link
Member

@JayShortway JayShortway left a comment

Choose a reason for hiding this comment

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

Let's go! 🙌

@skydoves skydoves enabled auto-merge April 4, 2025 11:49
github-merge-queue bot pushed a commit that referenced this pull request Apr 7, 2025
### Motivation

As we've discussed, making purchases module to transitive dependency for
the `ui` module. I'm going to apply for the `amazon` module as well once
#2327 is merged.
@skydoves
Copy link
Member Author

@tonidero @JayShortway Do you have any ideas for passing the test workflow? 😄

@@ -14,6 +14,7 @@ android {
}
customEntitlementComputation {
dimension "apis"
matchingFallbacks = ["defaults"]
Copy link
Member

@JayShortway JayShortway Apr 17, 2025

Choose a reason for hiding this comment

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

@skydoves This fixes it locally for me. 🤞 The way I understand the error is that :feature:amazon, :ui:revenuecatui and :ui:debugview don't declare the customEntitlementsComputation flavor, and so api-tester's customEntitlementsComputation flavor cannot find the appropriate flavor of those dependencies.

This matchingFallbacks option tells it to fall back to the defaults flavor of the dependency if it doesn't have a customEntitlementsComputation flavor. (cc @tonidero)

Copy link
Member Author

Choose a reason for hiding this comment

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

Got it! Thanks so much for jumping in and fixing it directly, @JayShortway! 🙏

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh nice! So we do use this in these modules:

    defaultConfig {
        missingDimensionStrategy("apis", "defaults")
    }

But seems this is not picking that up... In any case, I think this is fine 👍

Copy link
Member

Choose a reason for hiding this comment

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

Ah right! Should "apis" be included in matchingFallbacks you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm well I think apis is the "dimension", vs defaults/customEntitlementComputation which are the possible values of that dimension. I think matchingFallbacks requires the value of the dimension, if I understand correctly? So I think it should be enough as it is... Might be worth confirming it would still fail API tests for the custom entitlement computation flavor though, just in case

@JayShortway
Copy link
Member

Ugh, those Amazon tests are now failing with

Expected stackmap frame at this location.

I don't know what causes it, but I've seen it reported before: RevenueCat/purchases-kmp#271

I think it's related to the Amazon dependency and JDK version, but I don't know why it's suddenly an issue. Maybe updating the dependency from 3.0.5 to 3.0.7 helps? (Although there's nothing mentioned in the changelog.)

Otherwise we can try setting -noverify in the :feature:amazon module, as suggested here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants