Skip to content

build: upgrade to AGP 9.5.0 and Gradle 9.8.1 - #52

Merged
juev merged 2 commits into
mainfrom
51-agp-9-upgrade
Nov 2, 2026
Merged

juev merged 2 commits into
mainfrom
51-agp-9-upgrade

Conversation

@juev

@juev juev commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Closes #51

Change

  • AGP 8.13.2 → 9.5.0, Gradle 8.13 → 9.8.1 (wrapper with checksum).
  • Built-in Kotlin replaces the org.jetbrains.kotlin.android plugin.
  • Room's compiler moves from kapt to KSP 2.3.12; AGP 9 does not support kapt.
  • The generated test TLS directories are added by path, because AGP 9 rejects Provider source directories.
  • docs/research/r8-agp9.md records the measurements and checks.

Result

Unsigned release APK: 4 267 600 → 4 060 496 bytes (−4.9 %), dex −4.6 %, resources.arsc −40 %. AGP 9 applies optimized resource shrinking by default, so both Play Console R8 items are covered. Runtime start time and memory stay within emulator noise.

Tests

  • assembleDebug lintDebug testDebugUnitTest connectedDebugAndroidTest: 52 unit and 75 instrumented tests pass on API 36.
  • The release APK was installed on an emulator and checked by hand: Add, Settings with About, Share from another app.
  • Two clean release builds are byte-identical.

Before merge

Check the F-Droid build of this commit in the juev/fdroiddata fork pipeline.

juev added 2 commits November 2, 2026 12:12
AGP 9 brings built-in Kotlin, so the Kotlin Android plugin goes away,
and drops kapt support, so Room's compiler moves to KSP. AGP 9 rejects
Provider source directories; the generated test TLS directories are
added by path.
@juev

juev commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

F-Droid check: the juev/fdroiddata fork pipeline (test branch, now deleted) built this commit with AGP 9.5.0 and Gradle 9.8.1. Its unsigned APK matches a local unsigned build in all 108 entries but META-INF/version-control-info.textproto, which holds the git revision; the local build ran from a worktree where AGP found no git checkout. Both CI and F-Droid build from a checkout, as for 0.3.0.

@juev
juev merged commit 3e1cd03 into main Nov 2, 2026
1 check passed
@juev
juev deleted the 51-agp-9-upgrade branch November 2, 2026 09:29
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.

Upgrade to AGP 9 for R8 optimizations flagged by Play Console

1 participant