Skip to content

feat: Remove direct AndroidX Core dependency#305

Merged
TheRealAgentK merged 7 commits into
developfrom
chore/remove-direct-androidx-core-dependency
Jul 21, 2026
Merged

feat: Remove direct AndroidX Core dependency#305
TheRealAgentK merged 7 commits into
developfrom
chore/remove-direct-androidx-core-dependency

Conversation

@TheRealAgentK

Copy link
Copy Markdown
Contributor

Summary

  • replace the two AndroidX Core convenience APIs used by the provider with their equivalent platform APIs, available since the provider's minimum SDK 23
  • remove the provider's direct androidx.core:core dependency and refresh dependency locking and verification metadata
  • add regression coverage for granted and denied phone-state permission handling and device UUID persistence

This avoids publishing AndroidX Core as a direct transitive dependency of the provider. In particular, it avoids requiring consumers to adopt compile SDK 37 solely because AndroidX Core 1.19 declares minCompileSdk 37.

Validation

  • ./gradlew --no-daemon spotlessCheck provider:test
  • ./gradlew --no-daemon app:lint provider:lint provider:assembleDebug app:assembleDebug
  • ./gradlew --no-daemon app:assembleDebugAndroidTest
  • Maven-local publication and external consumer compilation/assembly with compile SDK 36
  • candidate and previous AAR class lists and public JVM ABI compared with no differences

The instrumentation APK compiles successfully. The connected test was not run locally because no emulator or device was attached; it will run in the existing connected-test CI job.

@TheRealAgentK TheRealAgentK changed the title Remove direct AndroidX Core dependency feat: Remove direct AndroidX Core dependency Jul 20, 2026
@TheRealAgentK
TheRealAgentK requested a review from ProRedCat July 20, 2026 02:22
@TheRealAgentK

Copy link
Copy Markdown
Contributor Author

This PR stems from Dependabot recommendation #302 .

The problem with upgrading Core to 1.19 is that it will require compileSDK 37 and that would cause potential issues for users. So, I'd rather delay this upgrade until using SDK 37 is more common. It's not really clear WHY this version requires the compileSDK bump either.

So, I then looked at simply staying at Core 1.18 but Amp suggested there there is an opportunity to remove the dependency on it. The provider now resolves Core 1.13 transitively through AppCompat rather than requesting Core 1.18 directly. The sample app continues to resolve Core 1.18 through its own AndroidX dependency graph, which is acceptable, the published provider no longer imposes it on customers.

@TheRealAgentK

Copy link
Copy Markdown
Contributor Author

@velocitysystems also as an FYI... because I know you're using RG4A in ReactNative

@velocitysystems velocitysystems left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@TheRealAgentK
TheRealAgentK merged commit cb776ee into develop Jul 21, 2026
8 checks passed
@TheRealAgentK
TheRealAgentK deleted the chore/remove-direct-androidx-core-dependency branch July 21, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants