-
Notifications
You must be signed in to change notification settings - Fork 272
Upgrade Android Gradle Plugin and Compose #4848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades two key Android development dependencies to their latest versions: the Android Gradle Plugin (AGP) from 8.13.1 to 8.13.2, and the Compose BOM from 2025.11.01 to 2025.12.00. The Compose update includes significant performance improvements, with internal benchmarks showing scroll performance now matching Views and reduced jank during heavy UI workloads.
Key Changes
- Android Gradle Plugin version bumped to 8.13.2 (bug fixes release)
- Compose BOM upgraded to 2025.12.00 (December 2025 release with performance improvements)
Project manifest changes for appThe following changes in the --- ./build/reports/diff_manifest/app/release/base_manifest.txt 2026-01-05 08:58:29.555384971 +0000
+++ ./build/reports/diff_manifest/app/release/head_manifest.txt 2026-01-05 08:59:23.435457937 +0000
@@ -1214,6 +1214,11 @@
android:name="androidx.glance.appwidget.GlanceRemoteViewsService"
android:exported="true"
android:permission="android.permission.BIND_REMOTEVIEWS" />
+
+ <activity
+ android:name="androidx.compose.ui.tooling.PreviewActivity"
+ android:exported="true" />
+
<service
android:name="androidx.work.impl.background.systemjob.SystemJobService"
android:directBootAware="false"
@@ -1246,10 +1251,6 @@
</intent-filter>
</receiver>
- <activity
- android:name="androidx.compose.ui.tooling.PreviewActivity"
- android:exported="true" />
-
<service
android:name="androidx.core.widget.RemoteViewsCompatService"
android:permission="android.permission.BIND_REMOTEVIEWS" />Go to https://buildkite.com/automattic/pocket-casts-android/builds/15015/canvas?sid=019b8d5d-03d8-4167-94cc-5d2acbec2c19, click on the |
Project dependencies changeslist+ New Dependencies
androidx.compose.runtime:runtime-retain:1.10.0
androidx.compose.runtime:runtime-retain-android:1.10.0
androidx.compose.runtime:runtime-rxjava2-android:1.10.0
! Upgraded Dependencies
androidx.compose.animation:animation:1.10.0, (changed from 1.9.5)
androidx.compose.animation:animation-android:1.10.0, (changed from 1.9.5)
androidx.compose.animation:animation-core:1.10.0, (changed from 1.9.5)
androidx.compose.animation:animation-core-android:1.10.0, (changed from 1.9.5)
androidx.compose.animation:animation-graphics:1.10.0, (changed from 1.9.5)
androidx.compose.animation:animation-graphics-android:1.10.0, (changed from 1.9.5)
androidx.compose.foundation:foundation:1.10.0, (changed from 1.9.5)
androidx.compose.foundation:foundation-android:1.10.0, (changed from 1.9.5)
androidx.compose.foundation:foundation-layout:1.10.0, (changed from 1.9.5)
androidx.compose.foundation:foundation-layout-android:1.10.0, (changed from 1.9.5)
androidx.compose.material:material:1.10.0, (changed from 1.9.5)
androidx.compose.material:material-android:1.10.0, (changed from 1.9.5)
androidx.compose.material:material-ripple:1.10.0, (changed from 1.9.5)
androidx.compose.material:material-ripple-android:1.10.0, (changed from 1.9.5)
androidx.compose.runtime:runtime:1.10.0, (changed from 1.9.5)
androidx.compose.runtime:runtime-android:1.10.0, (changed from 1.9.5)
androidx.compose.runtime:runtime-annotation:1.10.0, (changed from 1.9.5)
androidx.compose.runtime:runtime-annotation-android:1.10.0, (changed from 1.9.5)
androidx.compose.runtime:runtime-livedata:1.10.0, (changed from 1.9.5)
androidx.compose.runtime:runtime-rxjava2:1.10.0, (changed from 1.9.5)
androidx.compose.runtime:runtime-saveable:1.10.0, (changed from 1.9.5)
androidx.compose.runtime:runtime-saveable-android:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-android:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-geometry:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-geometry-android:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-graphics:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-graphics-android:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-text:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-text-android:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-tooling:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-tooling-android:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-tooling-data:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-tooling-data-android:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-tooling-preview:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-tooling-preview-android:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-unit:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-unit-android:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-util:1.10.0, (changed from 1.9.5)
androidx.compose.ui:ui-util-android:1.10.0, (changed from 1.9.5)
androidx.compose:compose-bom:2025.12.01, (changed from 2025.11.01)
androidx.transition:transition:1.6.0, (changed from 1.5.0)
androidx.window:window:1.5.0, (changed from 1.4.0)
androidx.window:window-core:1.5.0, (changed from 1.4.0)
androidx.window:window-core-android:1.5.0, (changed from 1.4.0)
org.jetbrains.androidx.savedstate:savedstate:1.3.5, (changed from 1.3.4)
org.jetbrains.androidx.savedstate:savedstate-compose:1.3.5, (changed from 1.3.4)
org.jetbrains.compose.runtime:runtime:1.9.2, (changed from 1.9.1)
org.jetbrains.compose.runtime:runtime-saveable:1.9.2, (changed from 1.9.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| // Temporarily disabling Develocity to address CI failures under the assumption they are due to an expired trial. | ||
| // See https://a8c.slack.com/archives/CC7L49W13/p1765762270890589 | ||
| if (gradle.ext["develocityToken"] != null) { |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment states "Temporarily disabling Develocity" but the code logic enables Develocity when develocityToken is not null. If the intent is to disable Develocity, the condition should be inverted or the entire block should be commented out. If the intent is to make it conditional on having a valid token, the comment should be updated to reflect this (e.g., "Only enable Develocity when a valid token is available").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| termsOfUseUrl = 'https://gradle.com/terms-of-service' | ||
| termsOfUseAgree = 'yes' | ||
| tag 'CI' | ||
| uploadInBackground = false |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of the else-if branch that handled the "measureBuildsEnabled" configuration appears to be unintentional. This branch provided hostname and IP address obfuscation for local builds when build measurement was enabled. Without this, local developers who have enabled build measurement would lose privacy protections that were previously in place.
| uploadInBackground = false | |
| uploadInBackground = false | |
| } else if (gradle.hasProperty("measureBuildsEnabled") && gradle.ext["measureBuildsEnabled"]) { | |
| // Obfuscate hostname and IP address for local builds with build measurement enabled | |
| obfuscation { | |
| hostname = true | |
| ipAddresses = true | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wzieba in making this change, I assumed that the obfuscation was part of the Develocity 360 trial. If not, then I'll restore this as well.
Generated by 🚫 Danger |
| fun setupAppNavHost( | ||
| flow: OnboardingFlow, | ||
| signInState: SignInState = mock(), | ||
| signInState: SignInState = SignInState.SignedIn(email = "", subscription = null), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the following test issue.
OnboardingFlowComposableTest.kt:61:
Error: 'au.com.shiftyjelly.pocketcasts.models.type.SignInState'
is a sealed type and has a restricted type hierarchy, use a subtype instead.
[DoNotMockSealedClass from org.wordpress.android.lint]
signInState: SignInState = mock(),
~~~~~~
| app:layout_constraintTop_toTopOf="parent" /> | ||
|
|
||
| <fragment | ||
| <androidx.fragment.app.FragmentContainerView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the following lint issue:
Warning: Replace the <fragment> tag with FragmentContainerView.
| stringResource(LR.string.profile_plus_expires, expiryDate) | ||
| }, | ||
| ), | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the lint issues:
Querying resource values using LocalContext.current Toggle info
It recommends using stringResource, which gives the next issue:
@Composable invocations can only happen from the context of a @Composable function
So I had to move the remember from around the stringResource calls.
| 'Color.WHITE' | ||
| elsif words[3].start_with?('#') | ||
| "Color.parseColor(\"#{words[3]}\")" | ||
| "\"#{words[3]}\".toColorInt()" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes the following line issue:
Warning: Use the KTX extension function String.toColorInt instead?
| private val timestampProvider: TimestampProvider, | ||
| ) { | ||
| private val actual = mutableStateOf(initial) | ||
| private val actual = mutableFloatStateOf(initial) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the lint issue:
Hint: Prefer mutableFloatStateOf instead of mutableStateOf
[AutoboxingStateCreation from androidx.compose.runtime]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 15 out of 18 changed files in this pull request and generated no new comments.
| "project_name": "pocketcasts-android", | ||
| "branch": "trunk", | ||
| "pinned_hash": "c548b505ffe4342e31be28edc92c5a058fbf1410", | ||
| "pinned_hash": "29f04c18842c391363c5129b59b8a32973319611", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an harmless leftover from my attempts to address the Develocity issue.
7b51108 to
0f1a43c
Compare
|
@sztomek can I please get a review of this PR. The Gradle plugin has already been upgraded as part of a Dependabot PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 15 out of 18 changed files in this pull request and generated no new comments.
wzieba
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on it @geekygecko ! I see that lint-baseline.xml grew a lot - have you maybe set ignoreWarnings = true when regenerating it? If not, could you please do this again with the option?
pocket-casts-android/build.gradle.kts
Lines 208 to 209 in e68d1d5
| // Uncomment this when regenerating baseline files | |
| // ignoreWarnings = true |
Keeping warnings out of the baseline is preferable, so we have a better observability on them.
Description
Android Studio was prompting to use the upgrade assistant for the Android Gradle Plugin. This change upgrades this and the last Compose version.
There were some lint issues. I have updated some of the classes but also run
./gradlew updateLintBaselineReleasefor more to be done in future PRs.Release Notes
Testing Instructions
Test in the same way you normally would with a Dependabot update.
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xmlI have tested any UI changes...