Skip to content

Update LaunchDarkly Android Client SDK to 5.11.0#5

Merged
kinyoklion merged 5 commits intomainfrom
devin/1772498438-update-android-sdk
Mar 4, 2026
Merged

Update LaunchDarkly Android Client SDK to 5.11.0#5
kinyoklion merged 5 commits intomainfrom
devin/1772498438-update-android-sdk

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Mar 3, 2026

Summary

Bumps launchdarkly-android-client-sdk from 4.2.2 to 5.11.0 — a major version upgrade (4.x → 5.x).

SDK 5.11.0 requires newer build tooling than what the project previously used (AGP 4.1.3 / Gradle 6.7). The build configuration has been modernized to match, and application code was updated for SDK 5.x API changes.

Changes

Upgraded the entire build toolchain for SDK 5.11.0 compatibility:

Component Before After
AGP 4.1.3 8.7.0
Gradle wrapper 6.7 8.9
compileSdk / targetSdk 33 34
minSdk 21 24
Java (compileOptions) 1.8 17
CI java-version 11 (newly added) 17

Structural changes:

  • Migrated build.gradle from legacy buildscript/allprojects DSL to modern plugins DSL
  • Added pluginManagement and dependencyResolutionManagement blocks to settings.gradle
  • Moved namespace from AndroidManifest.xml package attribute to app/build.gradle (required by AGP 8.x)
  • Updated CI workflows (build.yml, run.yml) from Java 11 to Java 17 — AGP 8.7.0 requires Java 17 to run

SDK 5.x API migration in MainApplication.java:

  • LDConfig.Builder()LDConfig.Builder(AutoEnvAttributes.Enabled) (required parameter added in 5.x)
  • Added import for com.launchdarkly.sdk.android.LDConfig.Builder.AutoEnvAttributes

Review & Testing Checklist for Human

  • Check for additional breaking API changes in the v4 → v5 migration. One breaking change was found and fixed (LDConfig.Builder now requires AutoEnvAttributes), but there may be others. The app also uses LDClient.get(), LDClient.init(), boolVariation(), registerFeatureFlagListener(), flush(), and LaunchDarklyException — verify these haven't changed signatures or behavior. Check the SDK changelog / migration guide.
  • Verify minSdk 24 is actually required. This was bumped from 21 — confirm whether SDK 5.x truly requires API 24+. If not, revert to 21 to avoid dropping Android 5.0–6.x device support unnecessarily.
  • Run the app on an emulator or device with a valid mobile key and confirm flag evaluation works end-to-end. CI now includes an emulator run, but given the scope of changes (major SDK bump + full build tooling overhaul + source code changes), a manual sanity check is recommended.
  • Verify Java 17 compileOptions are appropriate. Changed from VERSION_1_8 to VERSION_17 to match the AGP 8.x toolchain. Confirm this doesn't break runtime compatibility on target devices.

Suggested test plan: Open the project in Android Studio, verify Gradle sync succeeds, build the debug APK, run on an emulator with a valid mobile key, and confirm the SDK initializes and evaluates a flag correctly.

Notes

  • CI was added to this repo by the reviewer during this PR. The initial workflows used Java 11, which is incompatible with AGP 8.7.0 (requires Java 17). This was fixed in a subsequent commit.
  • The AutoEnvAttributes.Enabled usage mirrors the hello-android (Kotlin) example, whose equivalent PR was already merged.
  • This change was not tested locally — no Android build toolchain was available in the build environment. Human verification is strongly recommended.
  • Requested by: rlamb@launchdarkly.com
  • Devin Session

Updates the launchdarkly-android-client-sdk dependency from 4.2.2
to 5.11.0, the latest release of the LaunchDarkly Android Client SDK.

Co-Authored-By: rlamb@launchdarkly.com <rlamb@launchdarkly.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@kinyoklion kinyoklion marked this pull request as ready for review March 3, 2026 21:03
@kinyoklion kinyoklion requested a review from a team as a code owner March 3, 2026 21:03
SDK 5.11.0 requires newer build tooling. Updates:
- AGP: 4.1.3 → 8.7.0 (migrated from buildscript to plugins DSL)
- Gradle wrapper: 6.7 → 8.9
- compileSdk/targetSdk: 33 → 34
- minSdk: 21 → 24
- Added pluginManagement and dependencyResolutionManagement to settings.gradle
- Moved namespace from AndroidManifest.xml to build.gradle (AGP 8.x requirement)

Co-Authored-By: rlamb@launchdarkly.com <rlamb@launchdarkly.com>
@kinyoklion
Copy link
Member

Devin, this PR needs more work.

AGP 8.7.0 requires Java 17 to run. Updates:
- CI workflows: java-version 11 → 17
- compileOptions: VERSION_1_8 → VERSION_17

Co-Authored-By: rlamb@launchdarkly.com <rlamb@launchdarkly.com>
@devin-ai-integration
Copy link
Contributor Author

Fixed the CI failures. The root cause was that AGP 8.7.0 requires Java 17, but the newly added CI workflows were configured for Java 11.

Changes in latest commit:

  • Updated build.yml and run.yml: java-version: 1117
  • Updated app/build.gradle compileOptions: VERSION_1_8VERSION_17

SDK 5.x changed LDConfig.Builder to require an AutoEnvAttributes parameter.
Updated to use AutoEnvAttributes.Enabled, matching the hello-android Kotlin example.

Co-Authored-By: rlamb@launchdarkly.com <rlamb@launchdarkly.com>
@kinyoklion kinyoklion merged commit ca68be2 into main Mar 4, 2026
4 checks passed
@kinyoklion kinyoklion deleted the devin/1772498438-update-android-sdk branch March 4, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants