Skip to content

Bump androidx.lifecycle to 2.10.0 and re-enable ObsoleteLintCustomCheck #6541

Open

Description

@runningcode

Lint 9.5 (AGP 9.5.1) can't load the custom lint checks that androidx.lifecycle bundles before 2.10.0. It reports ObsoleteLintCustomCheck, which fails our warningsAsErrors builds. #6540 disables that check in five modules, because lifecycle 2.10.0 needs minSdk 23 and main is still on minSdk 21.

The 9.x.x branch is on minSdk 24 since #6518, so the minSdk blocker is gone there.

What to do

Once #6540 reaches 9.x.x:

  1. Resolve androidx.lifecycle 2.10.0 or newer in the affected modules.
  2. Remove disable += "ObsoleteLintCustomCheck" and its comment from:
    • sentry-android-fragment
    • sentry-android-navigation
    • sentry-compose
    • sentry-android-replay
    • sentry-uitest-android
  3. Run lint in the root build and in the sentry-android-integration-tests build.

Open question

The SDK modules get lifecycle only through compileOnly dependencies that are pinned to the oldest versions we support. For example, fragment-ktx 1.3.5 pulls lifecycle 2.3.1. Getting lifecycle to 2.10.0 there means compiling against newer AndroidX versions, either by raising those minimum versions or by forcing lifecycle alone. Decide which minimum versions v9 raises before doing this. The uitest app doesn't have this concern.

Agent notes
  • Verified on 2026-11-10. The lint.jar in lifecycle-runtime-android 2.9.4 calls KtLightModifierList.getKotlinOrigin(), which lint 9.5 removed. The 2.10.0, 2.11.0 and 2.12.0-alpha05 jars don't call it.
  • Forcing lifecycle-runtime, lifecycle-runtime-android and lifecycle-common to 2.10.0 in sentry-android-navigation, with the check re-enabled, gave a clean lintRelease: https://gradle.com/s/e3ppfr2wjiynm
  • Lifecycle versions resolved on main: fragment 2.3.1 (from fragment-ktx 1.3.5), navigation and compose 2.9.0, replay 2.8.7.
  • The lifecycle 2.10.0 AAR declares minSdkVersion="23".

Activity

  1. linear-code commented on Nov 10, 2026

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions