Update Compose BOM to 2026.03.00 and address deprecations#1667
Update Compose BOM to 2026.03.00 and address deprecations#1667
Conversation
…13.0 This update bumps core Compose libraries to 1.10.5 and Material 3 to 1.4.0. Applied necessary code changes to resolve deprecations and warnings introduced by these versions: - Replaced deprecated 'Divider' with 'HorizontalDivider' as per Material 3 1.2.0. Ref: https://developer.android.com/jetpack/androidx/releases/compose-material3#1.2.0 - Replaced deprecated 'rememberRichTooltipPositionProvider' with the new 'rememberTooltipPositionProvider' API introduced in Material 3 1.4.0-alpha03. Ref: https://developer.android.com/jetpack/androidx/releases/compose-material3#1.4.0-alpha03 - Removed redundant 'else' in UserInput.kt 'when' block. - Fixed annotation target warning in ProfileViewModel.kt using @param:DrawableRes. Verified with a clean build and successful execution of instrumented tests.
This update bumps core Compose libraries (animation, foundation, runtime, ui, material) from 1.10.3 to 1.10.5. No breaking changes or new APIs requiring code modifications were identified in the release notes for this version range. Verified with a clean build, unit tests, and instrumented tests on an emulator.
Bumps core Compose libraries (animation, foundation, runtime, ui, material) to 1.10.5 for JetNews, Jetcaster, Jetsnack, and Reply. - Verified with clean builds and unit tests across all projects. - Verified with instrumented tests for JetNews, Jetsnack, and Reply. - Jetcaster instrumented test failure is a pre-existing packaging issue with the rome library, unrelated to the Compose update.
- JetLagged: Migrated to PrimaryScrollableTabRow. - JetNews: Migrated to PrimaryTabRow and PrimaryScrollableTabRow. - Jetsnack: Updated ColorScheme instantiation to include new 'fixed' container roles. - Reply: Replaced WindowWidthSizeClass with isWidthAtLeastBreakpoint, and removed deprecated statusBarColor setting. - Jetcaster: Updated hiltViewModel imports to new androidx.hilt.lifecycle.viewmodel.compose package. Migrated FocusProperties enter/exit to onEnter/onExit for TV. Resolved WindowSizeClass deprecations using isWidthAtLeastBreakpoint. Updated wear compileSdk to 36.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on a comprehensive update of Compose and Jetpack libraries across various sample applications. The primary goal is to bring the projects up to date with the latest stable versions, specifically the Compose BOM, and to address numerous API deprecations that have arisen from these library advancements. This ensures the samples remain current, leverage modern best practices, and maintain compatibility with the evolving Android ecosystem. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively updates the Compose BOM to 2026.03.00 and other related dependencies across all sample projects. The associated deprecations, such as the migration from ScrollableTabRow to PrimaryScrollableTabRow, the update of WindowSizeClass APIs, and the new hiltViewModel import paths, have been handled correctly. The changes are consistent and improve the maintainability of the codebase by aligning it with the latest Jetpack Compose best practices. I've reviewed the changes and found no issues.
Refactored to use the modern `WindowSizeClass.BREAKPOINTS_V1.computeWindowSizeClass` extension method, removing the need for the `@Suppress("DEPRECATION")` annotation.
Refactored HomeScreen to accept a simple boolean 'isHomeAppBarExpanded' instead of the full WindowSizeClass object. This simplifies the API and removes the need for a mock WindowSizeClass in previews.
| val view = LocalView.current | ||
| if (!view.isInEditMode) { | ||
| SideEffect { | ||
| val window = (view.context as Activity).window |
There was a problem hiding this comment.
Note to reviewers: This code was removed because status bar colors should be handled using enableEdgeToEdge (which was already in the codebase).
This PR updates the Compose BOM to
2026.03.00across all samples and addresses several deprecations introduced by recent Compose and Jetpack library updates.Summary of Changes
Compose BOM Update:
androidx-compose-bomto2026.03.00for all projects (JetLagged,JetNews,Jetsnack,Reply,Jetcaster,Jetchat).1.10.5.Library Updates:
androidx.activity:activity-composeto1.13.0.androidx.lifecycle:lifecycle-composeandandroidx.lifecycle:lifecycle-runtime-composeto2.10.0.androidx.navigation:navigation-composeto2.9.7.androidx.hilt:hilt-navigation-composeto1.3.0.androidx.wear.compose:compose-materialto1.5.6.Addressed Deprecations & Best Practices:
TabRowandScrollableTabRowcomponents to the new Material 3PrimaryTabRowandPrimaryScrollableTabRow. UpdatedtabIndicatorOffsetto use the newTabIndicatorScope.WindowWidthSizeClassequality checks with the new recommendedisWidthAtLeastBreakpoint()scaling logic. Removed deprecated manual system UI flag configurations (window.statusBarColorandWindowCompat.getInsetsController), fully relying onenableEdgeToEdge()inMainActivityfor proper edge-to-edge drawing and contrast.ColorSchemeconstructor to include 12 new required 'fixed' container roles for theming.hiltViewModel()to use the new dedicated package (androidx.hilt.lifecycle.viewmodel.compose).enter/exittoonEnter/onExit.WindowSizeClass.computedeprecations by adapting to the required breakpoint system (computeWindowSizeClassandisWidthAtLeastBreakpoint).:wearmodulecompileSdkto36to satisfy new transitive requirements foractivity-compose1.13.0.Validation
JetNews,Jetsnack, andReply.