Open
Conversation
48e5470 to
8cc29c8
Compare
8cc29c8 to
d6a09b2
Compare
378cf40 to
c901660
Compare
c901660 to
d813595
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.11.4→0.13.00.11.4→0.13.0Release Notes
ZacSweers/metro (dev.zacsweers.metro)
v0.13.0Compare 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.
generateContributionProvidersThis release introduces a new
generateContributionProvidersAPI (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@Bindsdeclarations 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
generateContributionProvidersfeature, Metro will instead generate top-level@Providesdeclarations that mirror the injected class's inputs but only return its bound type. This means the annotated class can remaininternal, which both helps encapsulation and incremental compilation.The tradeoff is that
Implis no longer available directly on the graph. If you had any explicit code usages ofImpl, you would have to remove those too in favor of purely the bound type.[MEEP-1776]
@DefaultBindingThis release introduces a new
@DefaultBindingannotation 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) explicitbinding<T>()declarations in subtypes.Enhancements
METRO_ERRORfor a general catch-all in a lot of places).Fixes
rankparameter when processing contributed binding containers.Changes
2.4.0-Beta1@Assisted.value. See the docs on why in case you missed this! TL;DR, Metro matches by parameter names going forward.chunkFieldInitstransformProvidersToPrivatepublicProviderSeverity(usepublicScopedProviderSeverity)assistedIdentifierSeveritygenerateThrowsAnnotationContributors
Special thanks to the following contributors for contributing to this release!
Consider sponsoring Metro's development
v0.12.1Compare Source
2026-03-30
Enhancements
2.3.21+ and2.4.0-Beta2+.Fixes
allSessionslookup lazy to avoid lockups in the IDE.copyfunctions from@Includesaccessor candidates.@Includesaccessor candidates.Changes
androidx.tracingto 2.0.0-alpha04.2.4.0-Beta1.Contributors
Special thanks to the following contributors for contributing to this release!
v0.12.0Compare Source
2026-03-24
New
[MEEP-2014] Implicit class (map) keys
MapKey.implicitClassKeyis a new API to allow for class-based map keys to have their class parameters inferred on classes and@Bindsdeclarations.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.For classes, the implicit type is the annotated class. For
@Bindsdeclarations, 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:disabledto your compiler arguments.The compiler will also error if you attempt to do this on
@Providesdeclarations, 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 settingMapKey.implicitClassKeyto true. See its doc for more details.Misc
mingwX64target.Enhancements
FUNCTIONtargets if they have a@Targetannotation.Fixes
IllegalArgumentExceptionthrown when there are multiple top-level functions with the same name but only one is annotated with@Inject.SuspiciousUnusedMultibindinglocations.@OptionalBindingannotations to generated static factory creators if present.IntoSetandIntoMapno longer have aTargetofAnnotationTarget.CLASSChanges
2.2.@Assisted.valueis formally deprecated now. See the docs on why in case you missed this! TL;DR, Metro matches by parameter names going forward.2.3.20but still targets Kotlin 2.2 for its runtime artifacts and supports 2.2.20 all to 2.4.0 dev builds in its compiler.macosX64,tvosX64, andwatchosX64targets.2.4.0-dev-539to2.4.0-dev-2124. This should support the upcoming IntelliJ 2026.1 release as well as the upcoming Kotlin2.4.0-Beta1.2026.1 RC.6.1.0.Contributors
Special thanks to the following contributors for contributing to this release!
Configuration
📅 Schedule: 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 these updates again.
This PR was generated by Mend Renovate. View the repository job log.