Skip to content

chore(deps): update dependency dev.zacsweers.metro:dev.zacsweers.metro.gradle.plugin to v0.13.0#297

Merged
renovate[bot] merged 1 commit intomainfrom
renovate/dev.zacsweers.metro-dev.zacsweers.metro.gradle.plugin-0.x
Apr 5, 2026
Merged

chore(deps): update dependency dev.zacsweers.metro:dev.zacsweers.metro.gradle.plugin to v0.13.0#297
renovate[bot] merged 1 commit intomainfrom
renovate/dev.zacsweers.metro-dev.zacsweers.metro.gradle.plugin-0.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Apr 5, 2026

This PR contains the following updates:

Package Change Age Confidence
dev.zacsweers.metro:dev.zacsweers.metro.gradle.plugin 0.12.10.13.0 age confidence

Release Notes

ZacSweers/metro (dev.zacsweers.metro:dev.zacsweers.metro.gradle.plugin)

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

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, 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.

Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@renovate renovate bot merged commit 8268426 into main Apr 5, 2026
12 checks passed
@renovate renovate bot deleted the renovate/dev.zacsweers.metro-dev.zacsweers.metro.gradle.plugin-0.x branch April 5, 2026 09:02
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