Skip to content

Comments

Migrate Metro DI library to version 0.8.0#397

Merged
hossain-khan merged 2 commits intomainfrom
copilot/migrate-metro-di-library
Dec 2, 2025
Merged

Migrate Metro DI library to version 0.8.0#397
hossain-khan merged 2 commits intomainfrom
copilot/migrate-metro-di-library

Conversation

Copy link
Contributor

Copilot AI commented Dec 2, 2025

Upgrades Metro DI from 0.6.10 to 0.8.0, applying the required migration for the breaking change introduced in 0.7.0.

Changes

  • Version bump: Metro 0.6.100.8.0 in libs.versions.toml
  • @Inject@AssistedInject migration: All 7 presenter classes with @Assisted parameters now use @AssistedInject as required by Metro 0.7.0+
// Before (Metro < 0.7.0)
@Inject
class MyPresenter(@Assisted private val navigator: Navigator, ...) : Presenter<State>

// After (Metro >= 0.7.0)
@AssistedInject
class MyPresenter(@Assisted private val navigator: Navigator, ...) : Presenter<State>

Updated Presenters

  • AboutAppPresenter
  • AlertsListPresenter
  • AlertCheckLogViewerPresenter
  • AddNewRemoteAlertPresenter
  • NotificationMediumListPresenter
  • BackupRestorePresenter
  • ConfigureNotificationMediumPresenter

Notes

The existing DI architecture already follows Metro best practices (@DependencyGraph, @BindingContainer, @ContributesTo, @ContributesIntoMap). No structural changes needed.

Original prompt

This section details on the original issue you should resolve

<issue_title>Migrate Metro DI library to latest version and apply best practices for multi module setup</issue_title>
<issue_description>This app currently uses Metro https://github.com/ZacSweers/metro (https://github.com/ZacSweers/metro.git)

Based on https://github.com/ZacSweers/metro/releases the latest version is 0.8.0

Take a look into all release notes from currently used version 0.6.10 to 0.8.0 and use the migration if necessary and leverage latest features and optimizations if possible.


Take a look into this android app with multi-module setup and has latest metro DI library.

Example App: https://github.com/ZacSweers/CatchUp (https://github.com/ZacSweers/CatchUp.git)
Metro DI: https://github.com/ZacSweers/metro (https://github.com/ZacSweers/metro.git)


Ensure this weather alert app uses best practices on providing multi module DI support.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Dec 2, 2025
Co-authored-by: hossain-khan <99822+hossain-khan@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate Metro DI library to latest version Migrate Metro DI library to version 0.8.0 Dec 2, 2025
Copilot AI requested a review from hossain-khan December 2, 2025 05:25
@hossain-khan hossain-khan marked this pull request as ready for review December 2, 2025 11:40
@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Code Coverage Report

View Coverage Report

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

📊 APK Size Analysis

Comparing maincopilot/migrate-metro-di-library (this PR)

⚠️ Diffuse analysis failed. Check the workflow logs for details.


Generated by Diffuse via diffuse-action

@hossain-khan hossain-khan merged commit 9ffad24 into main Dec 2, 2025
8 of 10 checks passed
@hossain-khan hossain-khan deleted the copilot/migrate-metro-di-library branch December 2, 2025 11:58
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.

Migrate Metro DI library to latest version and apply best practices for multi module setup

2 participants