- Fix a bug in the Gradle plugin that accidentally realized all tasks in the module instead of evaluating them lazily, see #330.
- 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.
- 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
anddisableComponentMerging
through the variant filter, see #100.
- 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.
- 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.
- 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.
- 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.
@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 version2.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.
- This release upgrades Anvil to Kotlin
1.4.30
. Older Kotlin version 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 falsely detected provider methods inside of companion objects of interfaces as abstracted, see #187.
- Support nullable parameters for assisted injection properly, see #189.
- This release accidentally used a Kotlin preview version.
- Support Dagger's assisted injection feature and generate necessary code, see #165.
- Throw an error if a provider method is abstract, see #183.
- 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.
- Upgrade Kotlin to
1.4.20
. Note that this version no longer works with Kotlin1.4.10
or older, see #159.
- Upgrade Kotlin to
1.4.10
. Note that this release is not compatible with Kotlin1.4.20
. - Remove the usage of the now deprecated
KotlinGradleSubplugin
class, see #30. - Enable Kotlin's explicit API mode in the
:annotations
artifact.
- 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.
- DO NOT USE! This version was compiled with the wrong Kotlin version.
- 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.
- 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.
- Ignore, this release was built with Kotlin 1.4.20 accidentally.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Bug fix for Gradle's configuration caching #29.
- Same as
1.0.3
, only built with Kotlin 1.4-M3.
- Bug fix for Gradle's configuration caching #29.
- Discarded
- Added support for Gradle's configuration caching and made task configuration lazy #19.
- Fixed the implicit requirement to apply plugins in a specific order #8 #16.
- Fixed file path issues on Windows #13 #24.
- Allow Dagger modules that are interfaces #14 #24.
- Test Hephaestus with Kotlin
1.4
and1.4.2
. - Use
1.0.1-1.4-M3
to use Hephaestus in projects with Kotlin 1.4-M3.
- Initial release.