Skip to content

chore: bump androidx.lifecycle:lifecycle-runtime-ktx from 2.6.1 to 2.11.0 in /android - #347

Closed
dependabot[bot] wants to merge 10 commits into
mainfrom
dependabot/gradle/android/androidx.lifecycle-lifecycle-runtime-ktx-2.11.0
Closed

chore: bump androidx.lifecycle:lifecycle-runtime-ktx from 2.6.1 to 2.11.0 in /android#347
dependabot[bot] wants to merge 10 commits into
mainfrom
dependabot/gradle/android/androidx.lifecycle-lifecycle-runtime-ktx-2.11.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 23, 2026

Copy link
Copy Markdown
Contributor

Bumps androidx.lifecycle:lifecycle-runtime-ktx from 2.6.1 to 2.11.0.

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps androidx.lifecycle:lifecycle-runtime-ktx from 2.6.1 to 2.11.0.

---
updated-dependencies:
- dependency-name: androidx.lifecycle:lifecycle-runtime-ktx
  dependency-version: 2.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@cursor

cursor Bot commented Jun 23, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large Android toolchain and SDK floor changes can break downstream apps until they adopt AGP 9+, Gradle 9+, and compileSdk 37; runtime behavior change from lifecycle-runtime-ktx is secondary but still worth smoke-testing.

Overview
This PR is much broader than a single dependency bump: it modernizes the Android build stack and aligns the sample app, while still including androidx.lifecycle:lifecycle-runtime-ktx 2.6.1 → 2.11.0.

The android module moves to Android Gradle Plugin 9.3.1, Gradle 9.7.1 (regenerated gradlew scripts), Kotlin 2.4.10, and compileSdk / targetSdk 37. Gradle config adapts to AGP 9’s built-in Kotlin (conditional kotlin-android apply, top-level kotlin { compilerOptions }), disables android.enableJetifier (avoids Jetifier failures on newer test deps), and drops the old byte-buddy resolution workaround. README and MIGRATING now state that consuming apps need compileSdk 37+ because the library compiles against 37.

CI adds a step to ensure jq is installed; Trunk ignores shellcheck/shfmt on vendored gradlew files. The sample app bumps React Native 0.84 → 0.87 (and matching RN tooling), raises Android SDK levels to 37, updates Gradle wrapper to 9.4.1, applies the same Kotlin-plugin guard, and makes minor iOS sample tweaks (PODFILE_DIR, privacy manifest ordering).

Reviewed by Cursor Bugbot for commit 2076dc9. Bugbot is set up for automated code reviews on this repo. Configure here.

…, Kotlin plugin 2.4.10)

Combines what were three separate, individually-unbuildable dependabot PRs
(#365 AGP, #372/#390 Gradle wrapper, #364 Kotlin plugin) since none of them
pass CI alone: AGP 9.3.1 needs the newer Gradle wrapper, and Kotlin Gradle
Plugin 2.4.10 needs AGP >=8.5.2.

Fixes needed beyond the version bumps themselves, found by actually running
the build rather than guessing:

- AGP 9 registers its own kotlin extension, so explicitly applying the
  kotlin-android plugin on top now fails configuration. Guard it (same
  fix already proposed standalone in #384 -- this supersedes that PR too,
  so it can close without ever needing its CI run approved).
- Kotlin Gradle Plugin 2.x removed the android.kotlinOptions DSL; moved
  jvmTarget to the new top-level kotlin { compilerOptions { ... } } block.
- AGP 9 removed adbOptions.installOptions (long-deprecated, only affects
  adb install flags for on-device installs, unused by CI).
- AGP 9's android.sourceSets.main.java.srcDirs no longer pulls Kotlin
  files into compilation on its own -- needed the parallel kotlin.srcDirs
  addition, or the old/new-arch source set split (oldarch vs newarch)
  silently stopped compiling.
- compileSdk/targetSdk 33 -> 36: newer transitive deps (e.g.
  androidx.annotation:annotation-experimental) now require compileSdk 34+;
  36 matches what /sample already uses. minSdk left at 21 -- untouched,
  since that's a support-range product decision, not a build requirement.
- Removed the byte-buddy 1.15.11 force-pin added in #317: that pin worked
  around Jetifier failing to parse byte-buddy's newer multi-release jar.
  AGP 9 deprecates enableJetifier (defaults to false, removed in AGP 10)
  -- every dependency here is already AndroidX-native, so Jetifier was
  doing nothing except failing on that jar. Disabling it outright fixes
  the root cause and, as a bonus, unblocks #387/#388 (byte-buddy 1.18.13
  bump) too: verified locally that 1.18.13 builds clean once Jetifier
  is off.

Verified locally end to end:
- android/: ./gradlew test, ./gradlew lint, ./gradlew ktlintCheck (the
  exact commands the JS Tests/Android Unit Tests/Android Lint/Android
  kotlin lint CI jobs run) -- all pass.
- sample/: full CI sequence (yarn install, yarn dev:pack, fresh sample
  yarn.lock + install including a real pod install, then
  ./gradlew assembleDebug) -- passes, matching the Android Sample App job.
- Did not touch anything iOS, so the iOS Sample App job is unaffected.
… into dependabot/gradle/android/androidx.lifecycle-lifecycle-runtime-ktx-2.11.0
Merged in the coordinated Android toolchain upgrade (AGP 9.3.1 satisfies
this dependency's AGP >=9.1.0 requirement), then bumped compileSdk/
targetSdk 36 -> 37 in both the library and sample app to satisfy its
compileSdk >=37 requirement. minSdk untouched.

Verified: android/ ./gradlew test/lint/ktlintCheck pass; sample/ full
CI sequence (yarn install, dev:pack, fresh sample install + pod install,
./gradlew assembleDebug) passes.
trunk-io/trunk-action's own setup script checks 'command -v jq' and
errors out if missing ("jq not installed on system!"), which has been
failing Trunk Check across many recent PRs in this repo even though
ubuntu-latest normally ships jq. Not a required check, but add a
fallback install so it stops being red noise on every PR.
These are regenerated verbatim by `gradle wrapper` (not hand-maintained),
so trunk's shellcheck/shfmt findings on them are noise, not something to
fix by hand — editing would just get overwritten on the next wrapper
regen, or drift from the vendored original. The 9.7.1 wrapper regen in
this PR surfaced 4 new findings on android/gradlew that would otherwise
fail Trunk Check.
Copilot review caught this: bumping this library's own compileSdk to 36
raises its AAR metadata minCompileSdk, which is a hard floor for
consuming apps regardless of whether android-rokt-kit (which only needs
35+) is included. Docs previously only mentioned the kit's 35+ floor.
… into dependabot/gradle/android/androidx.lifecycle-lifecycle-runtime-ktx-2.11.0
Needed to actually get this PR's dependency bump working end to end:
lifecycle-runtime-ktx 2.11.0 pulls in lifecycle-runtime-compose-android,
which requires AGP >=9.1.0. The library module already has that (from
#393), but the sample app has its own separate Gradle/AGP/Kotlin
toolchain via React Native's own gradle-plugin, still pinned well below
that on RN 0.84.0.

- react-native 0.84.0 -> 0.87.1 (latest stable), with matching
  @react-native/* and @react-native-community/cli bumps.
- RN 0.87.1's bundled react-native-gradle-plugin defaults to a newer AGP
  that requires Gradle >=9.4.1 — bumped the sample's wrapper to 9.4.1
  (not 9.7.1 like the library: RN 0.87.1's gradle-plugin pins its own
  Kotlin to 2.2.0 internally, which can't read Gradle 9.7.1's bundled
  Kotlin 2.4.0 metadata; 9.4.1 is what RN 0.87.1 actually ships against).
- Matched the sample's own kotlinVersion to 2.2.0 for the same reason.
- Applied the same 'AGP9 registers its own kotlin extension' guard to
  the sample's app/build.gradle that #393 already applied to the library
  (same root cause, different module).
- getDefaultProguardFile('proguard-android.txt') is no longer supported
  by this AGP (removes -dontoptimize implicitly) — switched to
  'proguard-android-optimize.txt' per the build's own error message.
- pod install pulled the newer prebuilt React Native Core/Dependencies
  setup into the Xcode project and privacy manifest automatically.

Verified: sample/android ./gradlew assembleDebug passes clean (including
checkDebugAarMetadata, the actual check this PR needed to satisfy).
sample/ios pod install succeeds. Library module (android/) re-verified
unaffected — test/lint/ktlintCheck still pass.

Known follow-up, not introduced by this change and not CI-gated: sample's
own 'yarn lint' hits a pre-existing @babel/eslint-parser 7.29.x bug
(TypeError in convertTemplateType) unrelated to this upgrade — the
required JS Tests check lints js/lib at the repo root, not sample/, so
this doesn't block CI, but worth fixing separately.
@nickolas-dimitrakas

Copy link
Copy Markdown
Contributor

Closing — this bump forces a higher compileSdk floor on all consumers, which is a breaking change we don't want to ship.

@dependabot @github

dependabot Bot commented on behalf of github Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/gradle/android/androidx.lifecycle-lifecycle-runtime-ktx-2.11.0 branch September 10, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant