anvil VS Dagger2

Compare anvil vs Dagger2 and see what are their differences.


A Kotlin compiler plugin to make dependency injection with Dagger 2 easier. (by square)


A fast dependency injector for Android and Java. (by google)
Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • SonarLint - Clean code begins in your IDE with SonarLint
  • InfluxDB - Build time-series-based applications quickly and at scale.
anvil Dagger2
7 44
1,033 16,931
1.5% 0.1%
8.5 9.2
3 days ago 2 days ago
Kotlin Java
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of anvil. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-02.


Posts with mentions or reviews of Dagger2. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-10.

What are some alternatives?

When comparing anvil and Dagger2 you can also consider the following projects:

Guice - Guice (pronounced 'juice') is a lightweight dependency injection framework for Java 8 and above, brought to you by Google.

Toothpick - A scope tree based Dependency Injection (DI) library for Java / Kotlin / Android.

butterknife - Bind Android views and callbacks to fields and methods.


Weld - Weld, including integrations for Servlet containers and Java SE, examples and documentation

Dynamic CDI - Dynamic Context Dependency Injection

Apache DeltaSpike - Mirror of Apache Deltaspike


Feather - Lightweight dependency injection for Java and Android (JSR-330)

ActivityStarter - Simple Android Library, that provides easy way to start the Activities with arguments.

Katana - Lightweight, minimalistic dependency injection library for Kotlin & Android

android-ghostfish - Dependency injection container for Android