Skip to content

Update Compose BOM to 2026.03.00 and address deprecations#1667

Open
dturner wants to merge 9 commits intomainfrom
dt/version-updates
Open

Update Compose BOM to 2026.03.00 and address deprecations#1667
dturner wants to merge 9 commits intomainfrom
dt/version-updates

Conversation

@dturner
Copy link
Collaborator

@dturner dturner commented Mar 12, 2026

This PR updates the Compose BOM to 2026.03.00 across all samples and addresses several deprecations introduced by recent Compose and Jetpack library updates.

Summary of Changes

  1. Compose BOM Update:

    • Updated androidx-compose-bom to 2026.03.00 for all projects (JetLagged, JetNews, Jetsnack, Reply, Jetcaster, Jetchat).
    • Bumps core Compose libraries (animation, foundation, runtime, ui, material) to 1.10.5.
  2. Library Updates:

    • Updated androidx.activity:activity-compose to 1.13.0.
    • Updated androidx.lifecycle:lifecycle-compose and androidx.lifecycle:lifecycle-runtime-compose to 2.10.0.
    • Updated androidx.navigation:navigation-compose to 2.9.7.
    • Updated androidx.hilt:hilt-navigation-compose to 1.3.0.
    • Updated androidx.wear.compose:compose-material to 1.5.6.
  3. Addressed Deprecations & Best Practices:

    • JetLagged & JetNews: Migrated deprecated TabRow and ScrollableTabRow components to the new Material 3 PrimaryTabRow and PrimaryScrollableTabRow. Updated tabIndicatorOffset to use the new TabIndicatorScope.
    • Reply: Replaced deprecated WindowWidthSizeClass equality checks with the new recommended isWidthAtLeastBreakpoint() scaling logic. Removed deprecated manual system UI flag configurations (window.statusBarColor and WindowCompat.getInsetsController), fully relying on enableEdgeToEdge() in MainActivity for proper edge-to-edge drawing and contrast.
    • Jetsnack: Updated the Material 3 ColorScheme constructor to include 12 new required 'fixed' container roles for theming.
    • Jetcaster:
      • Updated 15 occurrences of hiltViewModel() to use the new dedicated package (androidx.hilt.lifecycle.viewmodel.compose).
      • Migrated focus change properties in TV UI components from enter/exit to onEnter/onExit.
      • Fixed WindowSizeClass.compute deprecations by adapting to the required breakpoint system (computeWindowSizeClass and isWidthAtLeastBreakpoint).
      • Updated :wear module compileSdk to 36 to satisfy new transitive requirements for activity-compose 1.13.0.

Validation

  • Clean builds and unit tests passed for all projects.
  • Instrumented tests passed on emulator for JetNews, Jetsnack, and Reply.

dturner added 5 commits March 12, 2026 22:51
…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.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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

  • Compose BOM Update: The Compose Bill of Materials (BOM) has been updated to version 2026.03.00 across all sample projects, which also bumps core Compose libraries to 1.10.5.
  • Library Version Updates: Several AndroidX libraries have been updated, including androidx.activity:activity-compose to 1.13.0, androidx.lifecycle:lifecycle-compose and lifecycle-runtime-compose to 2.10.0, androidx.navigation:navigation-compose to 2.9.7, androidx.hilt:hilt-navigation-compose to 1.3.0, and androidx.wear.compose:compose-material to 1.5.6.
  • Material 3 TabRow Migration: Deprecated TabRow and ScrollableTabRow components in JetLagged and JetNews have been migrated to the new Material 3 PrimaryTabRow and PrimaryScrollableTabRow, with tabIndicatorOffset updated to use TabIndicatorScope.
  • Reply App Modernization: The Reply app now uses isWidthAtLeastBreakpoint() for window size class checks, replacing deprecated WindowWidthSizeClass equality. Manual system UI flag configurations for status bar color and light status bars have been removed, relying fully on enableEdgeToEdge().
  • Jetsnack ColorScheme Update: The Material 3 ColorScheme constructor in Jetsnack has been updated to include 12 new required 'fixed' container roles for improved theming.
  • Jetcaster Deprecation Fixes: Jetcaster has migrated hiltViewModel() calls to the new dedicated package, updated TV UI focus change properties from enter/exit to onEnter/onExit, adapted WindowSizeClass.compute deprecations, and updated the :wear module's compileSdk to 36.
  • Jetchat Component Updates: Jetchat replaced Divider with HorizontalDivider and updated TooltipBox position provider usage.

🧠 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
  • JetLagged/app/src/main/java/com/example/jetlagged/sleep/JetLaggedHeaderTabs.kt
    • Replaced ScrollableTabRow with PrimaryScrollableTabRow.
    • Updated tabIndicatorOffset to use the new TabIndicatorScope.
  • JetLagged/gradle/libs.versions.toml
    • Updated androidx-activity-compose to 1.13.0.
    • Updated androidx-compose-bom to 2026.03.00.
  • JetNews/app/src/main/java/com/example/jetnews/ui/interests/InterestsScreen.kt
    • Replaced TabRow with PrimaryTabRow.
    • Replaced ScrollableTabRow with PrimaryScrollableTabRow.
  • JetNews/gradle/libs.versions.toml
    • Updated androidx-activity-compose to 1.13.0.
    • Updated androidx-compose-bom to 2026.03.00.
  • Jetcaster/gradle/libs.versions.toml
    • Updated androidx-activity-compose to 1.13.0.
    • Updated androidx-compose-bom to 2026.03.00.
    • Updated androidx-lifecycle-compose and androidx-lifecycle-runtime-compose to 2.10.0.
    • Updated androidx-navigation to 2.9.7.
    • Updated androidx-wear-compose to 1.5.6.
    • Updated androidxHiltNavigationCompose to 1.3.0.
  • Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/home/Home.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
    • Replaced WindowWidthSizeClass equality checks with isWidthAtLeastBreakpoint() for adaptive layout.
    • Added @Suppress("DEPRECATION") annotation for WindowSizeClass.compute.
  • Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/player/PlayerScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
    • Replaced WindowWidthSizeClass equality checks with isWidthAtLeastBreakpoint() for adaptive layout.
  • Jetcaster/mobile/src/main/java/com/example/jetcaster/util/WindowSizeClass.kt
    • Updated isCompact extension property to use isWidthAtLeastBreakpoint and isHeightAtLeastBreakpoint.
  • Jetcaster/tv/src/main/java/com/example/jetcaster/tv/ui/JetcasterApp.kt
    • Migrated focusProperties { enter = { ... } } to onEnter = { ... }.
  • Jetcaster/tv/src/main/java/com/example/jetcaster/tv/ui/component/Catalog.kt
    • Migrated focusProperties { exit = { ... } } to onExit = { ... }.
    • Migrated focusProperties { enter = { ... } } to onEnter = { ... }.
  • Jetcaster/tv/src/main/java/com/example/jetcaster/tv/ui/component/EpisodeRow.kt
    • Migrated focusProperties { enter = { ... } } to onEnter = { ... }.
    • Migrated focusProperties { exit = { ... } } to onExit = { ... }.
  • Jetcaster/tv/src/main/java/com/example/jetcaster/tv/ui/discover/DiscoverScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
    • Migrated focusProperties { enter = { ... } } to onEnter = { ... }.
  • Jetcaster/tv/src/main/java/com/example/jetcaster/tv/ui/episode/EpisodeScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
  • Jetcaster/tv/src/main/java/com/example/jetcaster/tv/ui/library/LibraryScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
  • Jetcaster/tv/src/main/java/com/example/jetcaster/tv/ui/player/PlayerScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
  • Jetcaster/tv/src/main/java/com/example/jetcaster/tv/ui/podcast/PodcastDetailsScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
  • Jetcaster/tv/src/main/java/com/example/jetcaster/tv/ui/search/SearchScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
  • Jetcaster/wear/build.gradle
    • Updated compileSdk version to 36.
  • Jetcaster/wear/src/main/java/com/example/jetcaster/ui/episode/EpisodeScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
  • Jetcaster/wear/src/main/java/com/example/jetcaster/ui/latest_episodes/LatestEpisodesScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
  • Jetcaster/wear/src/main/java/com/example/jetcaster/ui/library/LibraryScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
  • Jetcaster/wear/src/main/java/com/example/jetcaster/ui/player/PlayerScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
  • Jetcaster/wear/src/main/java/com/example/jetcaster/ui/podcast/PodcastDetailsScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
  • Jetcaster/wear/src/main/java/com/example/jetcaster/ui/podcasts/PodcastsScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
  • Jetcaster/wear/src/main/java/com/example/jetcaster/ui/queue/QueueScreen.kt
    • Migrated hiltViewModel import to androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel.
  • Jetchat/app/src/main/java/com/example/compose/jetchat/conversation/Conversation.kt
    • Replaced Divider with HorizontalDivider.
  • Jetchat/app/src/main/java/com/example/compose/jetchat/conversation/RecordButton.kt
    • Updated TooltipBox position provider to use TooltipAnchorPosition.Above.
  • Jetchat/app/src/main/java/com/example/compose/jetchat/conversation/UserInput.kt
    • Removed throw NotImplementedError() for InputSelector.NONE case.
  • Jetchat/app/src/main/java/com/example/compose/jetchat/profile/Profile.kt
    • Replaced Divider with HorizontalDivider.
  • Jetchat/app/src/main/java/com/example/compose/jetchat/profile/ProfileViewModel.kt
    • Changed @DrawableRes val photo to @param:DrawableRes val photo.
  • Jetchat/gradle/libs.versions.toml
    • Updated androidx-activity-compose to 1.13.0.
    • Updated androidx-compose-bom to 2026.03.00.
  • Jetsnack/app/src/main/java/com/example/jetsnack/ui/theme/Theme.kt
    • Added new 'fixed' container roles to the ColorScheme constructor.
  • Jetsnack/gradle/libs.versions.toml
    • Updated androidx-activity-compose to 1.13.0.
    • Updated androidx-compose-bom to 2026.03.00.
  • Reply/app/src/main/java/com/example/reply/ui/navigation/ReplyNavigationComponents.kt
    • Updated isCompact() extension to use isWidthAtLeastBreakpoint and isHeightAtLeastBreakpoint.
    • Updated navigation content position logic to use isHeightAtLeastBreakpoint.
  • Reply/app/src/main/java/com/example/reply/ui/theme/Theme.kt
    • Removed manual system UI flag configurations for status bar color and light status bars.
  • Reply/gradle/libs.versions.toml
    • Updated androidx-activity-compose to 1.13.0.
    • Updated androidx-compose-bom to 2026.03.00.
Activity
  • No specific activity (comments, reviews, progress) was provided in the context for this pull request.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

dturner added 3 commits March 12, 2026 23:47
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
Copy link
Collaborator Author

@dturner dturner Mar 13, 2026

Choose a reason for hiding this comment

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

Note to reviewers: This code was removed because status bar colors should be handled using enableEdgeToEdge (which was already in the codebase).

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