-
Notifications
You must be signed in to change notification settings - Fork 64
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
base: main
Are you sure you want to change the base?
Conversation
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.
@@ -25,12 +25,6 @@ android { | |||
} | |||
} | |||
|
|||
project.afterEvaluate { | |||
// Remove afterEvaluate | |||
// after https://github.com/Kotlin/kotlinx-kover/issues/362 is fixed |
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.
🙌
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.
Let's go! 🙌
### 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.
@tonidero @JayShortway Do you have any ideas for passing the test workflow? 😄 |
…tomEntitlementComputation" flavor.
@@ -14,6 +14,7 @@ android { | |||
} | |||
customEntitlementComputation { | |||
dimension "apis" | |||
matchingFallbacks = ["defaults"] |
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.
@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)
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.
Got it! Thanks so much for jumping in and fixing it directly, @JayShortway! 🙏
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.
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 👍
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.
Ah right! Should "apis"
be included in matchingFallbacks
you think?
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.
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
Ugh, those Amazon tests are now failing with
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 |
Motivation
amazon
&debugview
modules to KTSafterEvaluate
tasks. (refer to applicationVariants/libraryVariants are eagerly evaluated and result in missed test data Kotlin/kotlinx-kover#362)