0.1.3
- Change: Multibindings may not be empty by default. To allow an empty multibinding,
@Multibinds(allowEmpty = true)must be explicitly declared now. - New: Write graph metadata to reports (if enabled).
- New: Support configuring debug and reports globally via
metro.debugandmetro.reportsDestinationGradle properties (respectively). - Enhancement: Change how aggregation hints are generated to improve incremental compilation. Externally contributed hints are now looked up lazily per-scope instead of all at once.
- Enhancement: Optimize empty map multibindings to reuse a singleton instance.
- Enhancement: Report error diagnostic if Dagger's
@Reusableis used on a provider or injected class. - Enhancement: Tweak diagnostic error strings for members so that IDE terminals auto-link them better. i.e., instead of printing
example.AppGraph.provideString, Metro will printexample.AppGraph#provideStringinstead. - Enhancement: Support repeatable @ContributesBinding annotations with different scopes.
- Fix: Fix incremental compilation when
@Includes-annotated graph parameters change accessor signatures. - Fix: Don't allow graph extensions to use the same scope as any extended ancestor graphs.
- Fix: Don't allow multiple ancestor graphs of graph extensions to use the same scope.
- Fix: Handle scenarios where the compose-compiler plugin runs before Metro's when generating wrapper classes for top-level
@Composablefunctions. - Fix: Fix an edge case in graph extensions where child graphs would miss a provided scoped binding in a parent graph that was also exposed as an accessor.
- Fix: Fix Dagger interop issue when calling Javax/Jakarta/Dagger providers from Metro factories.
- Fix: Fix Dagger interop issue when calling
dagger.Lazyfrom Metro factories. - Fix: Preserve the original
ProviderorLazytype used in injected types when generating factory creators. - Temporarily disable hint generation in WASM targets to avoid file count mismatches until KT-75865.
- Add an Android sample: https://github.com/ZacSweers/metro/tree/main/samples/android-app
- Add a multiplatform Circuit sample: https://github.com/ZacSweers/metro/tree/main/samples/circuit-app
- Add samples docs: https://zacsweers.github.io/metro/samples
- Add FAQ docs: https://zacsweers.github.io/metro/faq
Special thanks to @JoelWilcox, @bnorm, and @japplin for contributing to this release!
What's Changed
- Support qualifiers and implicit boundTypes in dagger-anvil rank interop by @JoelWilcox in #293
- Update plugin com.gradle.develocity to v4 by @renovate in #303
- Update dependency com.google.devtools.ksp to v2.1.20-2.0.0 by @renovate in #304
- Unify FIR predicate definitions by @JoelWilcox in #305
- Update okio to v3.11.0 by @renovate in #307
- Fix repeatable @ContributesTo annotations being missed when aggregating contributions from downstream modules by @JoelWilcox in #308
- Update dependency Markdown to v3.8 by @renovate in #310
- Start an FAQ doc by @ZacSweers in #315
- Optimize Map*Factory when empty by @ZacSweers in #317
- Add Circuit & Android samples by @ZacSweers in #311
- Disallow empty multibindings by default by @ZacSweers in #319
- Update circuit to v0.27.1 by @renovate in #320
- Update dependency mkdocs-material to v9.6.12 by @renovate in #326
- Update kotlinInject.anvil to v0.1.4 by @renovate in #325
- Update dagger to v2.56.2 - autoclosed by @renovate in #324
- Update plugin poko to v0.18.6 by @renovate in #323
- Check for overlapping/conflicting ancestor scopes by @ZacSweers in #322
- Generate per-scope hint overloads by @ZacSweers in #328
- Record lookups to included graph dep accessors by @ZacSweers in #329
- Support repeatable @ContributesBinding annotations with different scopes by @JoelWilcox in #321
- Issue 309 - Fix runtime class cast exception when interoping with javax provider by @japplin in #327
- Another test repeated ContributesBinding with different scopes and same bound type by @japplin in #212
Full Changelog: 0.1.2...0.1.3