Skip to content

android: migrate agp to 9.4 - #865

Merged
hiimtmac merged 1 commit into
mainfrom
hiimtmac/agp-upgrade
Sep 15, 2026
Merged

hiimtmac merged 1 commit into
mainfrom
hiimtmac/agp-upgrade

Conversation

@hiimtmac

@hiimtmac hiimtmac commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Fixes tailscale/corp#48155

What changed

  • Updated AGP from 8.13.0 to 9.4.0
  • Updated the Gradle wrapper to 9.6.0
  • Updated the required Kotlin toolchain to 2.2.10
  • Added the Kotlin Compose compiler plugin
  • Migrated from the external Kotlin Android plugin to AGP built-in Kotlin
  • Migrated to the public AGP DSL
  • Replaced the deprecated Kotlin jvmTarget configuration
  • Removed generated compatibility flags that were demonstrably irrelevant
  • Retained behavior-sensitive compatibility settings
  • Preserved minSdk, targetSdk, and Java 17 compilation

Verification

  • ./gradlew test
  • ./gradlew assembleDebug
  • ./gradlew assembleRelease
  • ./gradlew assembleApplicationTestAndroidTest

@hiimtmac
hiimtmac added this pull request to stack #863 September 11, 2026 20:36
@hiimtmac
hiimtmac force-pushed the hiimtmac/agp-upgrade branch from 3a68105 to 33675c6 Compare September 11, 2026 20:41
@hiimtmac
hiimtmac requested review from barnstar and kari-ts and removed request for barnstar September 11, 2026 20:42
@hiimtmac
hiimtmac removed this pull request from stack #863 September 12, 2026 02:54
@hiimtmac
hiimtmac added this pull request to stack #868 September 12, 2026 02:57
@hiimtmac
hiimtmac force-pushed the hiimtmac/agp-upgrade branch from 33675c6 to 4283c1e Compare September 12, 2026 03:00
@hiimtmac
hiimtmac force-pushed the hiimtmac/agp-upgrade branch 2 times, most recently from 963af9b to 34b4043 Compare September 12, 2026 18:46
Comment thread Makefile Outdated
Comment thread android/gradle.properties
@@ -4,3 +4,8 @@ android.nonFinalResIds=false
android.nonTransitiveRClass=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iiuc, these are added to preserve existing behavior. do we want to follow up and remove these so we eventually adopt agp 9 defaults wehre possible?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep thats correct. These preserve the previous behaviour where defaults changed in AGP 9. I think we should follow up and remove them where possible to adopt the AGP 9 default values. The followups should validate the flags independently especially the two R8 settings against a minified release build. R8 changes are scary 😅

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, sounds good to me!

@hiimtmac
hiimtmac force-pushed the hiimtmac/agp-upgrade branch from 40459cc to 9e36c68 Compare September 14, 2026 17:54
@hiimtmac
hiimtmac force-pushed the hiimtmac/agp-upgrade branch from 9e36c68 to 73c1801 Compare September 14, 2026 18:31
@hiimtmac
hiimtmac requested a review from barnstar September 15, 2026 16:19
Base automatically changed from hiimtmac/gradle-daemon-jvm to main September 15, 2026 16:57
Fixes tailscale/corp#48155

Signed-off-by: Taylor McIntyre <taylorm@tailscale.com>
@hiimtmac
hiimtmac force-pushed the hiimtmac/agp-upgrade branch from 73c1801 to 23089f7 Compare September 15, 2026 16:57
@hiimtmac
hiimtmac requested a review from kari-ts September 15, 2026 17:11
@hiimtmac
hiimtmac dismissed barnstar’s stale review September 15, 2026 18:07

Fixed by bumping both docker images

@hiimtmac
hiimtmac merged commit c432259 into main Sep 15, 2026
5 checks passed
@hiimtmac
hiimtmac deleted the hiimtmac/agp-upgrade branch September 15, 2026 18:07
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.

3 participants