Skip to content

Define version constraints for sentry-android-fragment #2025

Description

@romtsn

Description

The sentry-android-fragment module depends on androidx.fragment:fragment-ktx. This one, in turn, depends on androidx.lifecycle:lifecycle-viewmodel-ktx, which had at some point the following change (moving ViewModelLazyKt from viewmodel-ktx to viewmodel):

This change can cause Duplicate classes check to fail if the versions of androidx.lifecycle:viewmodel and androidx.lifecycle:viewmodel-ktx do not much (e.g. viewmodel comes as a transitive dependency with a higher version than viewmodel-ktx, where this change has been introduced).

In theory, we could mitigate this issue by declaring dependency constraints for androidx.fragment:fragment-ktx, where we can define a range of allowed transitive dependency versions (viewmodel-ktx in this case).

Encountered this issue when using our SAGP auto-installation feature on this sample project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions