Skip to content

chore(deps): update dependency dev.zacsweers.metro to v0.13.2 - #209

Open
renovate[bot] wants to merge 1 commit into
developfrom
renovate/metro
Open

chore(deps): update dependency dev.zacsweers.metro to v0.13.2#209
renovate[bot] wants to merge 1 commit into
developfrom
renovate/metro

Conversation

@renovate

@renovate renovate Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
dev.zacsweers.metro 0.11.40.13.2 age confidence

Release Notes

ZacSweers/metro (dev.zacsweers.metro)

v0.13.2

Compare Source

2026-04-06

This is another small bugfix release for some issues with the new experimental Circuit code gen and generateContributionProviders features. Apologies for the churn! This should be the last of it, and is only necessary if you wanted to try out those new features.

Fixes
  • [FIR/Circuit] Add a diagnostic check for explicit return types for @CircuitInject presenter functions.
Fixes
  • [FIR] Fix map key generation for generateContributionProviders when the map key uses implicit class keys.
  • [FIR/Circuit] Assume implicit return types for @CircuitInject functions are UI types.

v0.13.1

Compare Source

2026-04-06

This is a small bugfix release for some issues with the new experimental Circuit code gen and generateContributionProviders features.

Enhancements
  • Add a @ExposeImplBinding annotation to disable generateContributionProviders behavior on a per-class basis.
  • [FIR] Warn if injecting an impl type when generateContributionProviders and the class isn't annotated @ExposeImplBinding.
Fixes
  • [FIR] Fix Circuit code gen not reporting contribution hints for downstream compilations.
  • [FIR] Don't generate contribution classes for @ContributesTo-annotated classes when generateContributionProviders is enabled.
  • [FIR] Don't generate contribution classes for @AssistedFactory-annotated classes when generateContributionProviders is enabled.
  • [FIR] Better ensure enableCircuitCodegen and generateContributionProviders work together when both enabled.
  • [IR] Fix default parameter expressions not being copied when generateContributionProviders is enabled. This specifically affected scoped or private bindings.
  • [IR] Fix qualifier annotations not being copied when generateContributionProviders is enabled.
  • [IR] Don't link expect/actual declarations if the callee is a synthetic declaration. This avoids some non-obvious IC failures with generateContributionProviders.
Contributors

Special thanks to the following contributors for contributing to this release!

Consider sponsoring Metro's development

v0.13.0

Compare Source

2026-04-04

New
Circuit codegen

Metro now includes experimental built-in support for Circuit, a Compose-first architecture for building kotlin apps. See the docs for more details.

In the long term, this will eventually move out to a separate plugin that can gracefully participate with Metro's code gen APIs. This is initially implemented within Metro to ease development.

generateContributionProviders

This release introduces a new generateContributionProviders API (Kotlin 2.3.20+) to optimize behavior with contributed APIs.

Up to now, Metro's aggregation APIs (i.e. @Contributes* binding annotations) have worked similar to Anvil, where the ultimately just generate @Binds declarations as simple shorthands for the consuming graphs. This comes with the caveat that the injected class must be publicly visible if it's used outside of that module.

Now, if you enable the new generateContributionProviders feature, Metro will instead generate top-level @Provides declarations that mirror the injected class's inputs but only return its bound type. This means the annotated class can remain internal, which both helps encapsulation and incremental compilation.

interface Base

@​ContributesBinding(AppScope::class)
@​Inject
internal class Impl : Base

// Works across modules!
@​DependencyGraph(AppScope::class)
interface AppGraph {
  val base: Base
}

The tradeoff is that Impl is no longer available directly on the graph. If you had any explicit code usages of Impl, you would have to remove those too in favor of purely the bound type.

[MEEP-1776] @DefaultBinding

This release introduces a new @DefaultBinding annotation that allows for setting a default binding on supertypes of contributed classes. This is useful for common base classes with generics that would otherwise require repetitive (or error-prone) explicit binding<T>() declarations in subtypes.

@&#8203;DefaultBinding<BaseFactory<*>>
interface BaseFactory<T : BaseFactory<T>>

@&#8203;ContributesIntoSet(AppScope::class) // now implicitly contributed as BaseFactory<*>
@&#8203;Inject
class HomeFactory(...) : BaseFactory<HomeFactory>
Enhancements
  • [IR] Use more unique diagnostic names in IR diagnostics (previously just used METRO_ERROR for a general catch-all in a lot of places).
Fixes
  • [IR] Consider Anvil's rank parameter when processing contributed binding containers.
  • [IR] When reporting qualifier mismatches, if a qualifier is absent on one declaration then the message will now say "absent" rather than the vague "null".
Changes
  • Support Kotlin 2.4.0-Beta1.
  • Removed @Assisted.value. See the docs on why in case you missed this! TL;DR, Metro matches by parameter names going forward.
  • Remove deprecated compiler options and Gradle extension properties.
    • chunkFieldInits
    • transformProvidersToPrivate
    • publicProviderSeverity (use publicScopedProviderSeverity)
    • assistedIdentifierSeverity
    • generateThrowsAnnotation
Contributors

Special thanks to the following contributors for contributing to this release!

Consider sponsoring Metro's development

v0.12.1

Compare Source

2026-03-30

Enhancements
  • Support top-level FIR gen (contribution hints, function inject, etc) in Kotlin/JS on 2.3.21+ and 2.4.0-Beta2+.
  • Support generic (top-level) function injection.
Fixes
  • [FIR] Make allSessions lookup lazy to avoid lockups in the IDE.
  • [IR] Exclude generated data class copy functions from @Includes accessor candidates.
  • [IR] Exclude destructuring component functions from @Includes accessor candidates.
Changes
  • Update shaded androidx.tracing to 2.0.0-alpha04.
  • Update shaded Wire dependency to 6.2.0.
  • Test Kotlin 2.4.0-Beta1.
Contributors

Special thanks to the following contributors for contributing to this release!

v0.12.0

Compare Source

2026-03-24

New
[MEEP-2014] Implicit class (map) keys

MapKey.implicitClassKey is a new API to allow for class-based map keys to have their class parameters inferred on classes and @Binds declarations.

This means that instead of redeclaring the annotated class in the key, for example @ViewModelKey, you can now omit it and it will be inferred.

@&#8203;ViewModelKey // <-- implicitly HomeViewModel::class
@&#8203;ContributesIntoMap(AppScope::class)
class HomeViewModel : ViewModel()

For classes, the implicit type is the annotated class. For @Binds declarations, the receiver or single parameter are the implicit type.

You may still specify an explicit type. The compiler will warn you if you specify a redundant one. If you need to suppress this diagnostic temporarily to ease migration, you can add -Xwarning-level=MAP_KEY_REDUNDANT_IMPLICIT_CLASS_KEY:disabled to your compiler arguments.

The compiler will also error if you attempt to do this on @Provides declarations, as those cannot be inferred.

Metro's first-party class-based map keys (like @ClassKey, @ViewModelKey, etc.) now support this. Custom map keys can opt-in to this by setting MapKey.implicitClassKey to true. See its doc for more details.

@&#8203;MapKey(implicitClassKey = true)
annotation class ViewModelKey(val value: KClass<out ViewModel> = Nothing::class)
Misc
  • [metrox-viewmodel] Add mingwX64 target.
Enhancements
  • [FIR] Add diagnostic to ensure map key annotations support FUNCTION targets if they have a @Target annotation.
  • [FIR] Improve annotation argument matching to only use fully resolved names or none at all. This helps avoid situations in the past with interop where an argument at the same index and type but different name could incorrectly be used.
Fixes
  • [IR] Fix IllegalArgumentException thrown when there are multiple top-level functions with the same name but only one is annotated with @Inject.
  • [IR] Only store a given binding container's own provider factories in metro metadata. This resolves a bug where we could end up duplicate-processing upstream providers in dynamic factories.
  • [IR] Fix a severity conversion compat function call for Kotlin 2.3.20+.
  • [IR] Ensure stable sort of output SuspiciousUnusedMultibinding locations.
  • [IR] Don't skip dynamic keys inherited from parent graphs when working with dynamic graphs.
  • [IR] Propagate @OptionalBinding annotations to generated static factory creators if present.
  • [IR] Preserve nullability when remapping parameters with generic layers.
  • [Runtime] IntoSet and IntoMap no longer have a Target of AnnotationTarget.CLASS
Changes
  • The Metro compiler now requires JVM 21+. Note that the runtime JVM artifacts still target 11 unless otherwise documented.
  • The Metro Gradle plugin now requires JVM 21+.
  • The Metro Gradle plugin now requires Gradle 9+. Note that if you do not use Kotlin Gradle DSL, it may work on older versions but YMMV.
  • The Metro Gradle plugin now targets Kotlin 2.2.
  • @Assisted.value is formally deprecated now. See the docs on why in case you missed this! TL;DR, Metro matches by parameter names going forward.
  • Metro's main branch now builds with Kotlin 2.3.20 but still targets Kotlin 2.2 for its runtime artifacts and supports 2.2.20 all to 2.4.0 dev builds in its compiler.
  • Remove deprecated macosX64, tvosX64, and watchosX64 targets.
  • Update Kotlin 2.4 compat support from 2.4.0-dev-539 to 2.4.0-dev-2124. This should support the upcoming IntelliJ 2026.1 release as well as the upcoming Kotlin 2.4.0-Beta1.
  • Test IntelliJ 2026.1 RC.
  • Update shaded Wire dependency to 6.1.0.
Contributors

Special thanks to the following contributors for contributing to this release!


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Android CI Summary

Step Results:

  • Debug Build: ✅ Success (3m 18s)
  • Code Style Check: ✅ Success (2m 41s)
  • Compose Stability: ✅ Success (53s)

Total Time: 6m 52s

🎉 All steps completed successfully!

@renovate renovate Bot changed the title chore(deps): update dependency dev.zacsweers.metro to v0.13.2 chore(deps): update metro to v0.13.2 Jun 2, 2026
@renovate renovate Bot changed the title chore(deps): update metro to v0.13.2 chore(deps): update metro Jun 22, 2026
@renovate renovate Bot changed the title chore(deps): update metro chore(deps): update dependency dev.zacsweers.metro to v0.13.2 Jun 25, 2026
@renovate
renovate Bot force-pushed the renovate/metro branch from 0709139 to 6eaa52b Compare July 16, 2026 18:09

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Android CI Summary

Step Results:

  • Debug Build: ✅ Success (3m 21s)
  • Code Style Check: ✅ Success (2m 54s)
  • Compose Stability: ✅ Success (53s)

Total Time: 7m 8s

🎉 All steps completed successfully!

@github-actions

Copy link
Copy Markdown

Roborazzi Snapshot Diff Report

File Name Comparison
com.metasearch.andro
id.feature.home.Home
UiKt_HomeUiLongClick
Preview_compare.png
com.metasearch.andro
id.feature.home.comp
onent.ModelItemKt_Mo
delItemPreview_compa
re.png
com.metasearch.andro
id.feature.search.fo
cusing.FocusingSearc
hUiKt_FocusingSearch
UiLoadingPreview_com
pare.png
com.metasearch.andro
id.feature.home.comp
onent.HomeHeaderKt_H
omeHeaderPreview_com
pare.png
com.metasearch.andro
id.feature.person.Pe
rsonUiKt_PersonUiPre
view_compare.png
com.metasearch.andro
id.feature.person_de
tail.component.Perso
nEditDialogContentKt
_PersonEditContentPr
eview_compare.png
com.metasearch.andro
id.feature.search.fo
cusing.component.Sea
rchResultListKt_Sear
chResultListPreview_
compare.png
com.metasearch.andro
id.feature.search.nl
s.NLSearchUiKt_NLSea
rchUiPreview_compare
.png
com.metasearch.andro
id.core.ui.component
.MetaSearchDividerKt
_MetaSearchDividerPr
eview_compare.png
com.metasearch.andro
id.core.ui.component
.MetaSearchLoadingIn
dicatorKt_MetaSearch
LoadingIndicatorPrev
iew_compare.png
com.metasearch.andro
id.feature.splash.Sp
lashUiKt_SplashUiPre
view_compare.png
com.metasearch.andro
id.feature.home.comp
onent.PersonCircleIt
emKt_PersonCircleIte
mPreview_compare.png
com.metasearch.andro
id.core.designsystem
.component.MetaSearc
hTextFieldKt_MetaSea
rchTextFieldPreview_
compare.png
com.metasearch.andro
id.feature.person.Pe
rsonUiKt_PersonUiDel
eteDialogPreview_com
pare.png
com.metasearch.andro
id.core.designsystem
.component.NetworkIm
ageKt_NetworkImagePr
eview_compare.png
com.metasearch.andro
id.feature.home.Home
UiKt_HomeUiCollapsed
Preview_compare.png
com.metasearch.andro
id.feature.person_de
tail.PersonDetailUiK
t_PersonDetailUiProf
ileSelectPreview_com
pare.png
com.metasearch.andro
id.feature.person_de
tail.component.Perso
nDetailHeaderKt_Pers
onDetailHeaderPrevie
w_compare.png
com.metasearch.andro
id.core.designsystem
.component.MetaSearc
hSwitchKt_MetaSearch
SwitchUncheckedPrevi
ew_compare.png
com.metasearch.andro
id.feature.photo_det
ail.component.ImageD
escriptionBottomShee
tContentKt_ImageDesc
riptionBottomSheetCo
ntentPreview_compare
.png
com.metasearch.andro
id.feature.graph.Gra
phUiKt_GraphUiPrevie
w_compare.png
com.metasearch.andro
id.core.ui.component
.WebViewErrorUiKt_We
bViewErrorUiPreview_
compare.png
com.metasearch.andro
id.core.designsystem
.component.MetaSearc
hSwitchKt_MetaSearch
SwitchCheckedPreview
_compare.png
com.metasearch.andro
id.core.ui.component
.MetaSearchDialogKt_
MetaSearchDialogPrev
iew_compare.png
com.metasearch.andro
id.feature.person.co
mponent.PersonItemKt
_PersonItemPreview_c
ompare.png
com.metasearch.andro
id.feature.graph_det
ail.component.Explor
eImageListKt_Explore
ImageListPreview_com
pare.png
com.metasearch.andro
id.feature.home.Home
UiKt_HomeUiPreview_c
ompare.png
com.metasearch.andro
id.core.ui.component
.MetaSearchSearchBar
Kt_MetaSearchSearchB
arPreview_compare.pn
g
com.metasearch.andro
id.feature.search.fo
cusing.FocusingSearc
hUiKt_FocusingSearch
UiPreview_compare.pn
g
com.metasearch.andro
id.feature.photo_det
ail.component.PhotoD
etailBottomBarKt_Pho
toDetailBottomBarPre
view_compare.png
com.metasearch.andro
id.feature.search.fo
cusing.component.Foc
usingSearchBottomBar
Kt_FocusingSearchBot
tomBarPreview_compar
e.png
com.metasearch.andro
id.feature.photo_det
ail.PhotoDetailUiKt_
PhotoDetailUiPreview
_compare.png
com.metasearch.andro
id.feature.graph.Gra
phUiKt_GraphUiWebVie
wPreview_compare.png
com.metasearch.andro
id.feature.person.co
mponent.PersonSearch
TextFieldKt_PersonSe
archTextFieldPreview
_compare.png
com.metasearch.andro
id.feature.graph_det
ail.GraphDetailUiKt_
GraphDetailUiPreview
_compare.png
com.metasearch.andro
id.feature.home.comp
onent.ModelItemKt_Mo
delItemDownLoadingPr
eview_compare.png
com.metasearch.andro
id.feature.screens.c
omponent.MetaSearchM
ainBottomBarKt_MetaS
earchMainBottomBarPr
eview_compare.png
com.metasearch.andro
id.feature.search.nl
s.component.NLSearch
TextFieldKt_NLSearch
TextFieldPreview_com
pare.png
com.metasearch.andro
id.core.designsystem
.component.MetaSearc
hButtonKt_MetaSearch
ButtonPreview_compar
e.png
com.metasearch.andro
id.feature.search.fo
cusing.component.Mor
eButtonKt_MoreButton
Preview_compare.png
com.metasearch.andro
id.feature.home.comp
onent.ModelItemKt_Mo
delItemInstalledPrev
iew_compare.png
com.metasearch.andro
id.core.designsystem
.component.MetaSearc
hToastKt_MetaSearchT
oastPreview_compare.
png
com.metasearch.andro
id.feature.search.nl
s.NLSearchUiKt_NLSea
rchUiLoadingPreview_
compare.png
com.metasearch.andro
id.feature.home.comp
onent.PartialAccessB
annerKt_PartialAcces
sBannerPreview_compa
re.png
com.metasearch.andro
id.feature.person_de
tail.PersonDetailUiK
t_PersonDetailUiPrev
iew_compare.png
com.metasearch.andro
id.core.ui.component
.MetaSearchSquareIma
geKt_MetaSearchSquar
eImagePreview_compar
e.png
com.metasearch.andro
id.core.ui.component
.MetaSearchCircleIma
geKt_MetaSearchCircl
eImagePreview_compar
e.png
com.metasearch.andro
id.core.designsystem
.component.MetaSearc
hTextFieldKt_MetaSea
rchTextFieldFilledPr
eview_compare.png
com.metasearch.andro
id.core.ui.component
.MetaSearchHeaderKt_
FocusingSearchHeader
Preview_compare.png
com.metasearch.andro
id.feature.graph.Gra
phUiKt_GraphUiErrorP
review_compare.png
com.metasearch.andro
id.feature.person_de
tail.PersonDetailUiK
t_PersonDetailUiEdit
DialogPreview_compar
e.png

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.

0 participants