anvil

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

APACHE-2.0 License

Stars
1.3K

Bot releases are hidden (Show)

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.
anvil - v2.0.8

Published by vRallev almost 4 years ago

  • Support Kotlin's explicit API mode in generated code, see #144.
  • Handle packages starting with an uppercase letter properly, see #150.
  • Use the correct import if an uppercase function is imported with the same name as the type, see #154.
  • Support properties as providers in Dagger modules, see #149.
anvil - v2.0.7

Published by vRallev almost 4 years ago

  • DO NOT USE! This version was compiled with the wrong Kotlin version.
anvil - v2.0.6

Published by vRallev about 4 years ago

  • Support constructor injection for classes with bounded types, see #126.
  • Print a better error message for Dagger provider methods with implicit return types, see #124.
  • Fix another instance of absolute paths as task inputs, see #65.
  • Use lazy APIs in the Gradle plugin for task configuration avoidance.
  • Handle named imports correctly, see #137.
anvil - v2.0.5

Published by vRallev about 4 years ago

  • Support type parameters for @Inject constructors, see #111.
  • Handle named imports properly, see #115.
  • Fix a bug for Gradle's experimental configuration caching feature, see #113.
  • Implement an extension for the new Kotlin IR backend. This extension will ship with Kotlin 1.4.20, see #11.
  • Build the project and run tests in CI with JDK 11.
  • Preserve variance keywords when generating factory classes, see #120.
anvil - v2.0.4

Published by vRallev about 4 years ago

Ignore, this release was built with Kotlin 1.4.20 accidentally.

anvil - v2.0.3

Published by vRallev about 4 years ago

  • Support classes with multiple generic parameters for field injection, see #91.
  • Fix missing Factory class when Anvil generates them, @MergeModules is used and a Kotlin object uses @ContributesBinding in the dependency graph.
  • Fix absolute paths in Kapt tasks, see #65.
  • Similar to Dagger throw an error if provider names clash, see #99.
  • Verify that the replacement and exclusion mechanism is only used within the same scope, see #107.
  • Rework how imports are resolved for generated code. That should fix problems around inner classes #97 and avoid unused imports #82.
anvil - v2.0.2

Published by vRallev about 4 years ago

  • Support using @ContributesBinding for objects and generate a @Provides rather than a @Binds function.
  • Allow using Anvil to generate Dagger factories in modules using @Subcomponent, see #74
  • Reduce the size of the generated bytecode in certain scenarios, see #76
  • Stop adding the @Generated annotation. This leads to issues on Android where this annotation doesn't exist, see #75
  • Support classes starting with a lowercase character, see #80
  • Support generic classes using field injection, see #91
  • Add missing import for inject constructor factories when the injected type is an inner class, see #79
anvil - v2.0.1

Published by vRallev about 4 years ago

  • Throw a compilation error when a @ContributesBinding annotation binds a generic type.
  • Remove absolute paths in Kotlin compilation task inputs #65.
  • Add new experimental feature to generate Dagger factories for faster build times.
anvil - v2.0.0

Published by vRallev about 4 years ago

  • Change the replaces attribute from a single class to an array. This gives the API more flexibility and avoids redundant classes. E.g. one Dagger module with several binding and provider methods may wish to replace multiple other Dagger modules.
  • Introduce the new @ContributesBinding annotation. This annotation allows you to contribute binding methods without actually writing a Dagger module.
    interface Authenticator
    
    @ContributesBinding(AppScope::class)
    class RealAuthenticator @Inject constructor() : Authenticator
    
    // The generated and automatically included Dagger module would look similar like this:
    @Module
    @ContributesTo(AppScope::class)
    abstract class AuthenticatorModule {
      @Binds abstract fun bindRealAuthenticator(authenticator: RealAuthenticator): Authenticator
    }
    
  • Support nested classes for contributed Dagger modules and component interfaces if the outer class uses a different scope #45.
anvil - v1.0.6

Published by vRallev about 4 years ago

  • Add the annotation artifact as an implementation dependency instead of api #40.
  • Remove the strong dependency on the Android Gradle Plugin and allow Anvil to be used in pure JVM modules #39.

Note: This version is compatible with Kotlin 1.3.72 and 1.4.0-rc. The bug that required special builds for the 1.4 milestone releases was fixed.

anvil - v1.0.5-1.4-M3

Published by vRallev about 4 years ago

  • Renamed the project from Hephaestus to Anvil #12. IMPORTANT: Anvil is not compatible with Hephaestus and you must upgrade the plugin in all of your libraries. The artifact coordinates changed, too.
  • Same as 1.0.5, only built with Kotlin 1.4-M3.
anvil - v1.0.5

Published by vRallev about 4 years ago

  • Renamed the project from Hephaestus to Anvil #12. IMPORTANT: Anvil is not compatible with Hephaestus and you must upgrade the plugin in all of your libraries. The artifact coordinates changed, too.
anvil - v1.0.4-1.4-M3

Published by vRallev about 4 years ago

  • Ensure that types cannot be included and excluded at the same time, which leads to unexpected results.
  • Fix a classpath issue in the Gradle plugin when using the new plugin syntax #31.
  • Same as 1.0.4, only built with Kotlin 1.4-M3.
anvil - v1.0.4

Published by vRallev about 4 years ago

  • Ensure that types cannot be included and excluded at the same time, which leads to unexpected results.
  • Fix a classpath issue in the Gradle plugin when using the new plugin syntax #31.
anvil - v1.0.3-1.4-M3

Published by vRallev over 4 years ago

  • Bug fix for Gradle's configuration caching #29.
  • Same as 1.0.3, only built with Kotlin 1.4-M3.
anvil - v1.0.3

Published by vRallev over 4 years ago

  • Bug fix for Gradle's configuration caching #29.
anvil - v1.0.2-1.4-M3

Published by vRallev over 4 years ago

Discarded

Package Rankings
Top 11.82% on Repo1.maven.org
Badges
Extracted from project README
Maven Central CI
Related Projects