Skip to content

chore: replace deprecated Resources.getColor and Gradle space-assignment DSL#46

Draft
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785143610-fix-deprecated-apis
Draft

chore: replace deprecated Resources.getColor and Gradle space-assignment DSL#46
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785143610-fix-deprecated-apis

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

No SDK bump needed — launchdarkly-android-client-sdk is already pinned to 5.13.2, the latest 5.x on Maven Central. This PR only clears deprecation warnings that the build currently emits.

Two deprecations fixed:

  • Resources.getColor(int) (deprecated since API 23) → ContextCompat.getColor(this, id) in MainActivity (5 call sites, both the initial render and the flag-change listener).
  • Groovy DSL space assignment in app/build.gradle, which Gradle 9 warns "will fail with an error in Gradle 10":
    - namespace "com.launchdarkly.hello_android"
    - compileSdk 37
    + namespace = "com.launchdarkly.hello_android"
    + compileSdk = 37
    (also applicationId, versionCode, versionName, minifyEnabled, source/targetCompatibility)

One remaining Gradle 9 deprecation ("Using a Project object as a dependency notation") originates inside the Android Gradle Plugin, not this repo's scripts, so it is not actionable here.

How verified

  • ./gradlew clean assembleDebug — BUILD SUCCESSFUL, and both the Kotlin getColor warnings and the namespace space-assignment warning are gone (verified with --warning-mode all).
  • Installed the debug APK on an Android 36 x86_64 emulator with the hello-apps mobile key injected locally (never committed) and launched it; the app initialized the SDK and rendered the flag evaluation, confirming the ContextCompat.getColor styling path works at runtime:

hello-android running on emulator

Link to Devin session: https://app.devin.ai/sessions/7a61003c1e984050ad12233068fab8a3

…ent DSL

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
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, CI, and merge conflict monitoring

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.

0 participants