Skip to content

Bump dev.zacsweers.metro:gradle-plugin from 0.9.4 to 0.10.0#127

Closed
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/gradle/dev.zacsweers.metro-gradle-plugin-0.10.0
Closed

Bump dev.zacsweers.metro:gradle-plugin from 0.9.4 to 0.10.0#127
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/gradle/dev.zacsweers.metro-gradle-plugin-0.10.0

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 20, 2026

Bumps dev.zacsweers.metro:gradle-plugin from 0.9.4 to 0.10.0.

Release notes

Sourced from dev.zacsweers.metro:gradle-plugin's releases.

0.10.0

Behavior Changes

  • Enable contributesAsInject by default. See its docs for more details, but in short this means that @Inject is now optional on @ContributesBinding, @ContributesIntoSet, and @ContributesIntoMap annotated declarations.
    @ContributesBinding(AppScope::class)
    // @Inject // <-- now implicit!
    class TacoImpl(...) : Taco
  • [Gradle / FIR] Enable FIR hint generation by default on Kotlin 2.3.20-Beta1 or later.
    • By extension, this resolves Metro's most subscribed issue (#460) by enabling cross-module contribution/aggregation features in non-jvm/android compilations 🎉.
    • Note that there is a separate known kotlinc issue around qualifier annotations that affects native builds and is targeted for 2.3.20-Beta2. Follow #1556 for updates.
  • [Gradle / FIR] Enable top-level function injection by default on Kotlin 2.3.20-Beta1 or later.
  • [Gradle / FIR] Disable automatic transformation of providers to private + deprecate the option, as this results in less efficient code generation and somewhat unclear error messages. It's recommended to write a lint check in another static analysis tool if you want this, for example this implementation from slack-lints.
    • Metro may add an option for the inverse in the future. i.e., allow writing a private provider in source but then transform it to internal at compile-time.

New

  • Support Map<K, Lazy<V>> and Map<K, Provider<Lazy<V>> multibindings expressions.
  • [FIR/IR] Report diagnostics for unmatched exclusions and replacements during contribution merging. These are written to reportsDestination if enabled, and should be used for debugging only.
  • [IR / Gradle] Add new experimental enableSwitchingProviders option. If enabled, this changes code generation to use "switching providers" to defer classloading until a giving binding is actually requested.
    • This is analogous to Dagger's fastInit feature.
    • You should really only use this if you've benchmarked it and measured a meaningful difference, as it comes with the same tradeoffs (always holding a graph instance ref, etc.)
  • [IR / Gradle] Add an unusedGraphInputsSeverity option to report diagnostics for unused direct graph inputs. This includes any @Provides or @Includes parameters to graph factories or managed binding containers declared via the @DependencyGraph.includes annotation.
    • This is in addition to the existing reportsDestination-only diagnostic for unused bindings, but limited to bindings that we know are not reused elsewhere and can thus safely soft-enforce at compile-time.
    • This matches a similar feature in Dagger.

Enhancements

  • [IR] Restructure graph validation and generation to be separate phases, allowing for whole-graph validation before any code gen runs and better optimizing shared bindings across graph extension hierarchies.
  • [IR] Improve member injection error trace in graph validation.
    • Previously it would show something like this
      dev.zacsweers.metro.MembersInjector<test.FeatureScreen> is requested at
          [test.FeatureGraph] test.FeatureGraph#inject()
      
    • Now it will specify the injected type is being injected instead
      test.Dependency is requested at
          [test.FeatureGraph] test.FeatureScreen.dependency
      test.FeatureScreen is injected at
          [test.FeatureGraph] test.FeatureGraph#inject()
      
    • It now also reports the location at the exact member injection callable declaration, rather than the graph.
  • [IR] Validate parameter type keys on native builds to help clarify encounters with KT-83427. Example below:
    e: Mirror/create function parameter type mismatch:
      - Source:         com.example.navigation.NavigationProviders.navigationSerializationModule
      - Mirror param:   @com.example.app.navigation.NavigationSerializers kotlin.collections.Set<kotlinx.serialization.modules.SerializersModule>
      - create() param: kotlin.collections.Set<kotlinx.serialization.modules.SerializersModule>
    

... (truncated)

Changelog

Sourced from dev.zacsweers.metro:gradle-plugin's changelog.

0.10.0

2026-01-19

Behavior Changes

  • Enable contributesAsInject by default. See its docs for more details, but in short this means that @Inject is now optional on @ContributesBinding, @ContributesIntoSet, and @ContributesIntoMap annotated declarations.
    @ContributesBinding(AppScope::class)
    // @Inject // <-- now implicit!
    class TacoImpl(...) : Taco
  • [Gradle / FIR] Enable FIR hint generation by default on Kotlin 2.3.20-Beta1 or later.
    • By extension, this resolves Metro's most subscribed issue (#460) by enabling cross-module contribution/aggregation features in non-jvm/android compilations 🎉.
    • Note that there is a separate known kotlinc issue around qualifier annotations that affects native builds and is targeted for 2.3.20-Beta2. Follow #1556 for updates.
  • [Gradle / FIR] Enable top-level function injection by default on Kotlin 2.3.20-Beta1 or later.
  • [Gradle / FIR] Disable automatic transformation of providers to private + deprecate the option, as this results in less efficient code generation and somewhat unclear error messages. It's recommended to write a lint check in another static analysis tool if you want this, for example this implementation from slack-lints.
    • Metro may add an option for the inverse in the future. i.e., allow writing a private provider in source but then transform it to internal at compile-time.

New

  • Support Map<K, Lazy<V>> and Map<K, Provider<Lazy<V>> multibindings expressions.
  • [FIR/IR] Report diagnostics for unmatched exclusions and replacements during contribution merging. These are written to reportsDestination if enabled, and should be used for debugging only.
  • [IR / Gradle] Add new experimental enableSwitchingProviders option. If enabled, this changes code generation to use "switching providers" to defer classloading until a giving binding is actually requested.
    • This is analogous to Dagger's fastInit feature.
    • You should really only use this if you've benchmarked it and measured a meaningful difference, as it comes with the same tradeoffs (always holding a graph instance ref, etc.)
  • [IR / Gradle] Add an unusedGraphInputsSeverity option to report diagnostics for unused direct graph inputs. This includes any @Provides or @Includes parameters to graph factories or managed binding containers declared via the @DependencyGraph.includes annotation.
    • This is in addition to the existing reportsDestination-only diagnostic for unused bindings, but limited to bindings that we know are not reused elsewhere and can thus safely soft-enforce at compile-time.
    • This matches a similar feature in Dagger.

Enhancements

  • [IR] Restructure graph validation and generation to be separate phases, allowing for whole-graph validation before any code gen runs and better optimizing shared bindings across graph extension hierarchies.
  • [IR] Improve member injection error trace in graph validation.
    • Previously it would show something like this
      dev.zacsweers.metro.MembersInjector<test.FeatureScreen> is requested at
          [test.FeatureGraph] test.FeatureGraph#inject()
      
    • Now it will specify the injected type is being injected instead
      test.Dependency is requested at
          [test.FeatureGraph] test.FeatureScreen.dependency
      test.FeatureScreen is injected at
          [test.FeatureGraph] test.FeatureGraph#inject()
      
    • It now also reports the location at the exact member injection callable declaration, rather than the graph.
  • [IR] Validate parameter type keys on native builds to help clarify encounters with KT-83427. Example below:

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [dev.zacsweers.metro:gradle-plugin](https://github.com/ZacSweers/metro) from 0.9.4 to 0.10.0.
- [Release notes](https://github.com/ZacSweers/metro/releases)
- [Changelog](https://github.com/ZacSweers/metro/blob/main/CHANGELOG.md)
- [Commits](ZacSweers/metro@0.9.4...0.10.0)

---
updated-dependencies:
- dependency-name: dev.zacsweers.metro:gradle-plugin
  dependency-version: 0.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update java code labels Jan 20, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jan 26, 2026

Superseded by #134.

@dependabot dependabot bot closed this Jan 26, 2026
@dependabot dependabot bot deleted the dependabot/gradle/dev.zacsweers.metro-gradle-plugin-0.10.0 branch January 26, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file java Pull requests that update java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants