Releases: square/anvil
Releases · square/anvil
v2.0.5
- 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.
v2.0.4
v2.0.3
- 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.
v2.0.2
- 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
v2.0.1
v2.0.0
- 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.
v1.0.6
- Add the annotation artifact as an
implementation
dependency instead ofapi
#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.
v1.0.5-1.4-M3
- 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.
v1.0.5
v1.0.4-1.4-M3
- 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.