anvil

A Kotlin compiler plugin to make dependency injection with Dagger 2 easier.

APACHE-2.0 License

Stars
1.3K

Bot releases are visible (Hide)

anvil - v2.3.8

Published by vRallev almost 3 years ago

  • Add an option in the Anvil DSL syncGeneratedSources to sync generated sources in the IDE, see #412.
  • Fall back to PSI parsing for BindingModuleGenerator, see #310. (this allows you generated @ContributesBinding annotations in custom code generators)
  • Support generic supers for assisted factories when the assisted factory interface is generated, see #407.
  • Support generic type resolution in assisted factories, see #395. (regression in previous release)
  • Align TypeNames for assisted lambda arguments between descriptors and PSI, see #400. (regression in previous release)
  • Enable experimental Anvil APIs by default in the compiler testing utilities, see #398.
  • Make it easy the feed a compilation result to another Anvil compilation in the testing utilities, see #404.
  • Use Anvil version 2.3.8-1-6-0-RC2 if you want to test Kotlin 1.6.0-RC2. Until Anvil hasn't adopted Kotlin 1.6 I'll publish additional versions that are required due to compiler API incompatibilities.
anvil - v2.3.7

Published by vRallev almost 3 years ago

  • Allow configuring the KotlinCompilation when using the utilities to test custom code generators, see #386.
  • Support invariant and covariant type parameters properly, see #388.
  • Use Psi parsing for assisted factory generation, see #326.
  • Support assisted injection for deeply nested inner classes, see #394.
  • Use Anvil version 2.3.7-1-6-0-RC if you want to test Kotlin 1.6.0-RC. Until Anvil hasn't adopted Kotlin 1.6 I'll publish additional versions that are required due to compiler API incompatibilities.
anvil - v2.3.6

Published by vRallev about 3 years ago

  • Support constant members in annotations properly, see #379.
  • Use Anvil version 2.3.6-1-6-0-RC if you want to test Kotlin 1.6.0-RC. Until Anvil hasn't adopted Kotlin 1.6 I'll publish additional versions that are required due to compiler API incompatibilities.
anvil - v2.3.5

Published by vRallev about 3 years ago

  • Upgraded Anvil to Kotlin 1.5.31.
  • Use correct setter name for members in generated factories, see #362.
  • Handle the special case of injecting a Provider<Lazy<Type>> properly for member injection, see #365.
  • Make sure in JVM modules that the configuration anvilMain extends anvil so that code generators are picked up, see #368.
  • Support member injection for super classes, see #343.
  • Prefer Kotlin collection types when Java collections are imported through a star import, see #371.
anvil - v2.3.4

Published by vRallev about 3 years ago

  • Upgraded Anvil to Kotlin 1.5.21.
  • Properly inject members when property setters are annotated, see #340.
  • Properly inject members when using assisted injection, see #342.
  • Don't generate a singleton factory (object), if the class with the inject constructor has any type parameter, see #348.
  • Look for star imports before checking imports from the Kotlin package. Star imports have a higher priority, see #358.
  • Handle the special case of injecting a Provider<Lazy<Type>> properly, see #344.
anvil - v2.3.3

Published by vRallev over 3 years ago

  • Fix a bug in the Gradle plugin that accidentally realized all tasks in the module instead of evaluating them lazily, see #330.
anvil - v2.3.2

Published by vRallev over 3 years ago

  • Remove an accidental required dependency on the Android Gradle Plugin, see #323.
  • Ensure that excluded bindings and modules are only excluded for the specific component that merges a scope and not all components merging the same scope, see #321.
  • Disable precise Java tracking for the stub generating Kotlin compilation task when needed, see #324.
anvil - v2.3.1

Published by vRallev over 3 years ago

  • Ignore replaced bindings/modules from excluded bindings/modules, see #302.
  • Create separate Anvil configurations for each build type, see #307.
  • Introduce a new VariantFilter for the Gradle extension. This API allows you to enable and disable Anvil for specific variants. Allow to override generateDaggerFactories, generateDaggerFactoriesOnly and disableComponentMerging through the variant filter, see #100.
anvil - v2.3.0

Published by vRallev over 3 years ago

  • Add option to extend Anvil with your own CodeGenerator, see here and #265.
  • Use Gradle Property APIs in the Anvil extension. This is a source-breaking change (but binary-compatible) for Kotlin and .kts consumers of the Anvil Gradle plugin, see #284.
  • Upgrade Anvil to Kotlin 1.5.10. The old legacy compiler backend is still supported and the IR backend not required yet.
anvil - v2.2.3

Published by vRallev over 3 years ago

  • Support the JVM and Android targets for Kotlin Multiplatform projects, see #222.
  • Add a generation only mode for Anvil in order to avoid performance penalties when still using KAPT in the same module, see #258.
  • Respect qualifiers when checking whether there is a duplicate binding, see #270.
anvil - v2.2.2

Published by vRallev over 3 years ago

  • Handle inner generic classes in factories for constructor injection properly, see #244.
  • Generate a correct factory when a class has both constructor and member injection, see #246.
  • Make generated assisted factories match interface function names, see #252.
  • Fix a parsing error for inner class reference expressions, see #256.
  • Verify that the qualifier is added to generated methods for member injection, see #264.
anvil - v2.2.1

Published by vRallev over 3 years ago

  • Fix problematic check for Kotlin annotations, see #232.
  • Handle Lazy assisted parameters properly in generated assisted factories.
  • Build and test Anvil with Kotlin 1.5.0-M2 in CI.
anvil - v2.2.0

Published by vRallev over 3 years ago

  • @ContributesBinding supports qualifiers now, see the README and documentation for examples.
  • You can generate multibindings with @ContributesMultibinding now, see the README and documentation for examples, see #152.
  • Upgrade Dagger to 2.32. Generating factories for assisted injection is no longer compatible with older Dagger versions due to the behavior change in Dagger itself. Make sure to use Dagger version 2.32 or newer in your project, too.
  • @ContributesBinding has a priority field now for cases where you don't have access to replaced bindings at compile time, see #161.
  • Use the mangled function name to generate the factory for a provider method.
  • Handle fully qualified names with type parameters for Dagger factories properly, see #198.
  • Support classes in the root package and don't crash, see #227.
anvil - v2.1.0

Published by vRallev over 3 years ago

  • This release upgrades Anvil to Kotlin 1.4.30. Older Kotlin versions are no longer supported moving forward.
  • The IR extension is enabled by default. Anvil is compatible with the new IR and old compiler backend.
anvil - v2.0.14

Published by vRallev over 3 years ago

  • Anvil falsely detected provider methods inside of companion objects of interfaces as abstracted, see #187.
  • Support nullable parameters for assisted injection properly, see #189.
anvil - v2.0.13

Published by vRallev over 3 years ago

  • Please use version 2.0.14. This release accidentally used a Kotlin preview version.
anvil - v2.0.12

Published by vRallev over 3 years ago

  • Support Dagger's assisted injection feature and generate necessary code, see #165.
  • Throw an error if a provider method is abstract, see #183.
anvil - v2.0.11

Published by vRallev almost 4 years ago

  • Declare the Dagger Factory generation option as stable.
  • Support a mode that only generates Dagger Factories through the generateDaggerFactoriesOnly flag, see #164.
  • Suppress any deprecation warnings in generated code, see #169.
anvil - v2.0.10

Published by vRallev almost 4 years ago

  • Upgrade Kotlin to 1.4.20. Note that this version no longer works with Kotlin 1.4.10 or older, see #159.
anvil - v2.0.9

Published by vRallev almost 4 years ago

  • Upgrade Kotlin to 1.4.10. Note that this release is not compatible with Kotlin 1.4.20.
  • Remove the usage of the now deprecated KotlinGradleSubplugin class, see #30.
  • Enable Kotlin's explicit API mode in the :annotations artifact.
Package Rankings
Top 11.82% on Repo1.maven.org
Badges
Extracted from project README
Maven Central CI
Related Projects