-
-
Notifications
You must be signed in to change notification settings - Fork 444
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
Define version constraints for sentry-android-fragment #2025
Comments
Does it help if we stop using |
For dependency constraints, we'd need to support Gradle Module Metadata, so it'd not work if using another build system, I guess. |
Yeah, but not sure if it's a problem in other build systems (probably it is, but the fraction of those is just too small). So I guess we are good here with just doing it for gradle. Using |
Then it's an error on their end since we don't use |
yeah, kinda. They would need to update their viewmodel-ktx to the later version. I mean, this can be fixed on the user's site even now, by declaring the explicit dependency to |
We decided to add a troubleshooting page entry for this |
So this was actually resolved by #2175 as we declare the transitive dependencies as compileOnly now, and will use whatever the user has defined in their app at runtime, so this problem will not appear anymore. |
Description
The
sentry-android-fragment
module depends onandroidx.fragment:fragment-ktx
. This one, in turn, depends onandroidx.lifecycle:lifecycle-viewmodel-ktx
, which had at some point the following change (movingViewModelLazyKt
from viewmodel-ktx to viewmodel):This change can cause Duplicate classes check to fail if the versions of
androidx.lifecycle:viewmodel
andandroidx.lifecycle:viewmodel-ktx
do not much (e.g.viewmodel
comes as a transitive dependency with a higher version thanviewmodel-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.
The text was updated successfully, but these errors were encountered: