Remove customEntitlementComputation flavor for non-purchases modules#1180
Conversation
| } | ||
|
|
||
| if (!project.getProperties()["ANDROID_VARIANT_TO_PUBLISH"].contains("customEntitlementComputation")) { | ||
| apply plugin: "com.vanniktech.maven.publish" |
There was a problem hiding this comment.
I didn't like how many hardcoded strings I had to add here (property name, property value, plugin name... But I think it should be ok? Open to thoughts if anyone has other ideas.
There was a problem hiding this comment.
can you do the if inside the plugins block? I assume you can't and that's why you put it here.
Also, is it possible to do this?
if (!project.getProperties()["ANDROID_VARIANT_TO_PUBLISH"].contains("customEntitlementComputation")) {
plugins {
alias libs.plugins.mavenPublish
}
}
Alternatively, you can do this I think https://stackoverflow.com/a/53408667 , but I don't think it's better
There was a problem hiding this comment.
I tried putting the if inside the plugins block and it didn't work. Also tried using the alias format without luck, so was forced to use the old format :(
There was a problem hiding this comment.
As for using flavors... That would only help for the condition, but not the format right? As in, we would still have to use apply plugin....
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1180 +/- ##
=======================================
Coverage 85.75% 85.75%
=======================================
Files 180 180
Lines 6178 6178
Branches 893 893
=======================================
Hits 5298 5298
Misses 545 545
Partials 335 335 ☔ View full report in Codecov by Sentry. |
|
Merging this, but lmk if you have any other thoughts! |
### Description Same as was added in iOS in RevenueCat/purchases-ios#2567. Includes the changes in #1180 This PR adds a debug view in the Android SDK and uses it in the `MagicWeatherCompose` sample app. This debug view is meant to be a Jetpack compose function, even though later we might add convenience accessors for people not using jetpack compose. It's extracted to a different module so it can be published separately from the main SDK. It also attempts to keep all the code in the debug source set, to try to include as few code in the release variants. The provided API is currently 2 composable functions: - `DebugRevenueCatDebugScreen`: This is the actual UI that is part of the debug screen. In case devs want to use it in a custom UI. - `DebugRevenueCatBottomSheet`: This will display the debug screen as a bottom sheet. This is what's used in the `MagicWeatherCompose` sample app. ##### TODO - [ ] Allow visualizing offerings in debug menu - [ ] Support non-composable apps by wrapping it into a fragment, with utility launch methods. - [ ] Split library for debug and release - [ ] Add UI tests - [ ] Support publishing the new module as different libraries for debug and release. - [ ] Remove module local substitution once debugview library has been published https://github.com/RevenueCat/purchases-android/assets/808417/b3a953e4-b96f-4b06-8294-d2bcf9b66c7d
**This is an automatic release.** ### Bugfixes * Fix NoSuchElementException by using poll when accessing serviceRequests (#1190) via Cesar de la Vega (@vegaro) ### Other Changes * Debug view: rename package (#1191) via Toni Rico (@tonidero) * Debugview: Add snapshot tests for debug view using Paparazzi (#1187) via Toni Rico (@tonidero) * Debug view: Add offerings section and purchasing capabilities (#1186) via Toni Rico (@tonidero) * Debug view: Initial UI + Usage in MagicWeatherCompose (#1075) via Toni Rico (@tonidero) * Remove customEntitlementComputation flavor for non-purchases modules (#1180) via Toni Rico (@tonidero) Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Description
This reverts the changes in #1169, and additionally makes some changes so we only apply the maven publish plugin when using the
defaultsflavor in non-purchases modules. This should avoid having to have extra flavors in those modules and having them support thecustomEntitlementComputationflavor.This was becoming a bit of a problem as I was working in the debug view #1075. Since some of the functions I'm using aren't in the
customEntitlementComputationflavor. I could have split the debug view library by flavor to make it compatible, but that seems like unnecessary work.