Skip to content

Add Galaxy Store wrapper dependency for hybrid SDKs#1673

Open
rickvdl wants to merge 1 commit into
mainfrom
rickvdl/galaxy-hybrids
Open

Add Galaxy Store wrapper dependency for hybrid SDKs#1673
rickvdl wants to merge 1 commit into
mainfrom
rickvdl/galaxy-hybrids

Conversation

@rickvdl

@rickvdl rickvdl commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds the purchases-hybrid-common-store-galaxy add-on dependency that allows simplified bringing Galaxy Store support to the hybrid SDKs.

Motivation

The addition of the wrapper dependency simplifies dependency version management by allowing the hybrid SDKs to just depend on another PHC library (next to purchases-hybrid-common and optionally purchases-hybrid-common-ui) using the same PHC version number.

The newly added store support wrapper library (purchases-hybrid-common-store-galaxy) will in turn depend on the right version (the same version as the core dependency) of the native store support dependency (purchases-store-galaxy). This ensures simple version management and avoids the hybrid SDKs having to depend on a specific version of the native store support dependency as well as the matching version of PHC.

Dependency visualization

Screenshot 2026-06-09 at 15 20 36

Testing

  • Verify version bump works as expected for release
  • Extensive manual testing

@rickvdl rickvdl added the pr:feat A new feature label Jun 9, 2026
@rickvdl rickvdl force-pushed the rickvdl/galaxy-hybrids branch from 28b0ada to 114587a Compare June 9, 2026 13:12
@rickvdl rickvdl changed the title Add Galaxy Store add-on dependency for hybrid Android SDKs Add Galaxy Store wrapper dependency for hybrid SDKs Jun 9, 2026
@rickvdl rickvdl force-pushed the rickvdl/galaxy-hybrids branch from 114587a to 3e022d5 Compare June 9, 2026 13:37
@rickvdl rickvdl force-pushed the rickvdl/galaxy-hybrids branch from 3e022d5 to f7d479b Compare June 9, 2026 13:40
@rickvdl rickvdl marked this pull request as ready for review June 9, 2026 13:58
@rickvdl rickvdl requested a review from a team as a code owner June 9, 2026 13:58

@tonidero tonidero 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.

I think this makes sense!

}

android {
namespace = "com.revenuecat.purchases.hybridcommon.galaxy"

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.

Supernitpicky... I wonder if we should make the namespace com.revenuecat.purchases.galaxy.hybridcommon... but not a strong opinion. I think it's probably fine as is.

}

dependencies {
api(project(":hybridcommon"))

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.

Considering there is no code, we might not need this... (this means we will bring the main SDK along when adding the galaxy SDK). But having said that, I don't think it's a big deal to do so either so can leave as is.

diagnosticsEnabled: Boolean? = null,
automaticDeviceIdentifierCollectionEnabled: Boolean? = null,
preferredLocale: String? = null,
galaxyBillingMode: String? = null,

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.

Hmm I'm thinking whether it could be worth to add something more extensible like galaxyConfigurationOptions which is a map of string to string. So in case we add more galaxy-only options, we don't need to add it to the configure method which is getting unwieldly 😅. TBH, if we wanted to make it really easy in the hybrids (at the cost of any compilation safety), would be to make a single map to any parameter containing all parameters... But that's a separate discussion 😅.

So happy to leave as this for now and we can think about this refactor separately.

null, "PRODUCTION" -> galaxyBillingMode(GalaxyBillingMode.PRODUCTION)
"TEST" -> galaxyBillingMode(GalaxyBillingMode.TEST)
"ALWAYS_FAIL" -> galaxyBillingMode(GalaxyBillingMode.ALWAYS_FAIL)
else -> warnLog("Attempted to configure with unknown Galaxy billing mode: $galaxyBillingMode.")

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.

Should we also default to production in this case? Not sure if it's needed to set it though...

Comment thread fastlane/Fastfile
project_dir: 'android'
)

# Publish hybridcommon-store-galaxy with -bc7 suffix

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.

TBH, this is likely not needed... We actually should remove it soon (Google Play won't accept updates with BC7 soon). So feel free to leave it out.


buildTypes {
release {
isMinifyEnabled = false

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.

Hmm I would say probably not needed? or it could be set to true I think? I see we do have it set to false in the "main" hybridcommon library... But I think it's not a good choice... Probably each hybrid will need to reference the necessary methods, and it's there where we might need to set minification to false (not sure TBH)

@@ -0,0 +1,65 @@
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed

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 believe this might have been fixed in gradle 8.1? If so, we might not need it.

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

Labels

pr:feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants