Add CI workflows for building and running the example app#6
Merged
kinyoklion merged 3 commits intomainfrom Mar 4, 2026
Merged
Conversation
Co-Authored-By: rlamb@launchdarkly.com <rlamb@launchdarkly.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: rlamb@launchdarkly.com <rlamb@launchdarkly.com>
Co-Authored-By: rlamb@launchdarkly.com <rlamb@launchdarkly.com>
kinyoklion
approved these changes
Mar 4, 2026
tanderson-ld
approved these changes
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two GitHub Actions CI workflows to
hello-android-java, mirroring the equivalent workflows recently merged intohello-android(Kotlin):build.yml— Checks out the repo, sets up Java 11 (Temurin), and runs./gradlew assembleDebug.run.yml— Fetches the LaunchDarkly mobile key and flag key from AWS SSM viarelease-secrets, injects them into the Java source files withsed, builds the APK, launches it on an Android emulator (API 29, x86_64), and validates that the UI displays a successful flag evaluation viauiautomator dump.All actions are pinned to specific SHAs with version comments and reference links.
Key differences from the Kotlin (
hello-android) workflows:sedfor flag key — only the first occurrence ofmy-boolean-flagis replaced (the constant declaration on line 21). The second occurrence on line 29 is an==guard that shows an AlertDialog; replacing it too would cause the guard to pass (Java string interning makes==true for identical literals), displaying a dialog that blocks theuiautomatorvalidation.Action versions used
actions/checkout11bd71901bbe5b1630ceea73d27597364c9af683actions/setup-javac5195efecf7bdfc987ee8bae7a71cb8b11521c00launchdarkly/gh-actions/actions/release-secretsbbbbbda684f500766264e7fe327668094ba83d1cjlumbroso/free-disk-space54081f138730dfa15788a46383842cd2f914a1bereactivecircus/android-emulator-runner324029e2f414c084d8b15ba075288885e74aef9cReview & Testing Checklist for Human
sedfor flag key is fragile: Thesed '0,/my-boolean-flag/{s/...}'only replaces the first occurrence to avoid triggering the==guard on line 29 ofMainActivity.java. This works because the constant declaration (line 21) comes before the comparison (line 29). If the source file is reordered, the wrong occurrence could be replaced. Consider whether the app code should use.equals()instead of==for these checks (separate issue).grep -oi 'Feature flag.*is true'assumes the flag evaluates totrue. If the flag configuration in LaunchDarkly changes to returnfalse, this will cause CI to fail even though the app is working correctly. Monitor the flag configuration or adjust the validation to accept both values.AWS_ROLE_ARNrepository variable: The run workflow requiresvars.AWS_ROLE_ARNto be set in the repo settings for OIDC-based AWS authentication. This worked in CI, but confirm it's properly documented in repo settings.buildandrunworkflows passed CI, which is a good initial sign, but you should validate at least once after merge that ongoing CI remains stable.Notes
release-secretspattern used across LaunchDarkly hello-app repos.Link to Devin Session: https://app.devin.ai/sessions/0b2bb3fc4f5845238a581c78eefd5369
Requested by: rlamb@launchdarkly.com