Skip to content

upgrade to AGP 8.2.2 and gradle 8.2 to support compileSdkVersion 34 - #1237

Open
seekstar wants to merge 1 commit into
vanilla-music:masterfrom
seekstar:upgrade-AGP-to-8.2.2
Open

upgrade to AGP 8.2.2 and gradle 8.2 to support compileSdkVersion 34#1237
seekstar wants to merge 1 commit into
vanilla-music:masterfrom
seekstar:upgrade-AGP-to-8.2.2

Conversation

@seekstar

Copy link
Copy Markdown

I have used Vanilla Music for several years and I find that it doesn't work properly on my new phone running Android 15. Since I'm also a software developer (although I mainly develop database engines), I think maybe I can help to fix the compatibility problem. This is a practice PR to make me familiar with the Android App development.

The project already targets SDK 34, but AGP 7.3.1 predates API 34 and is not a supported combination for it (Gradle warns: "We recommend using a newer Android Gradle plugin to use compileSdk = 34"). This PR upgrades AGP to 8.2.2, the last patch of the 8.2 line: it is the first AGP line officially tested with API 34 and only requires Gradle 8.2 and JDK 17, keeping the toolchain bump minimal.

AGP 8 makes resource IDs non-final by default (android.nonFinalResIds=true) to speed up incremental compilation, so switch statements over R.* constants no longer compile. Convert them to if-else chains. No behavior change intended.

Other AGP 8 migrations:

  • move package from AndroidManifest.xml to the namespace DSL in app/build.gradle
  • rename lintOptions to lint

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant