# google/dagger

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/google-dagger).**

17,697 stars · 2,040 forks · Java · apache-2.0 · fork

## Links

- GitHub: https://github.com/google/dagger
- Homepage: https://dagger.dev
- awesome-repositories: https://awesome-repositories.com/repository/google-dagger.md

## Description

Dagger is a compile-time dependency injection framework for Java and Android applications. It automates the construction and wiring of object graphs by generating static source code during the build process, which eliminates the need for reflection or runtime bytecode generation.

The framework distinguishes itself by performing strict validation of the entire dependency structure before the application runs, ensuring that all required bindings are satisfied and identifying circular references early. It manages object lifecycles through scoped containers and supports lazy resolution, allowing developers to defer the instantiation of resources until they are explicitly requested.

The system provides comprehensive tools for managing complex object graphs, including support for environment-specific configurations, assisted injection, and the ability to swap production components with test-specific implementations. It also facilitates the aggregation of related objects and handles optional dependencies, providing a structured approach to resource allocation and memory management.

## Tags

### Software Engineering & Architecture

- [Static Injection Frameworks](https://awesome-repositories.com/f/software-engineering-architecture/application-frameworks/general-purpose-frameworks/java-frameworks/static-injection-frameworks.md) — Constructs and validates object graphs for Java and Android applications using compile-time code generation.
- [Dependency Injection](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/dependency-injection.md) — Automates the construction and wiring of object graphs at compile time, eliminating the need for reflection or expensive runtime bytecode generation. ([source](https://dagger.dev/dev-guide))
- [Mobile Injection Frameworks](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection/mobile-injection-frameworks.md) — Provides a platform-specific solution for managing object lifecycles and dependency provision in mobile applications.
- [Compile-Time Builders](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/dependency-graph-builders/compile-time-builders.md) — The framework generates code to link annotated classes and modules into a complete dependency structure that serves as the central entry point for application components. ([source](https://dagger.dev/dev-guide))
- [Dependency Graph Compilers](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/dependency-graph-compilers.md) — Performs strict compile-time checks to ensure all required dependencies are satisfied and the graph is complete before the final application is built. ([source](https://dagger.dev/dev-guide))
- [Compile-Time Validators](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/dependency-graph-compilers/compile-time-validators.md) — Analyzes the entire dependency structure during compilation to detect missing bindings or circular references before the application runs.
- [Compile-Time Code Generation](https://awesome-repositories.com/f/software-engineering-architecture/compile-time-code-generation.md) — Generates static factory classes and wiring logic during the build process to eliminate reflection and runtime overhead.
- [Dependency Injection Providers](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-providers.md) — The framework retrieves fresh objects or multiple instances by injecting providers that execute the binding logic on demand instead of relying on a single static value. ([source](https://dagger.dev/users-guide))
- [Component Builders](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/dependency-graph-builders/component-builders.md) — Exposes explicit interfaces for injecting runtime configuration values into the dependency graph during the initialization phase.
- [Assisted Injection Systems](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/dependency-injection/assisted-injection-systems.md) — Injects parameters provided at runtime into objects that also require dependencies already managed by the central dependency injection container. ([source](https://dagger.dev/api/latest/))
- [Dependency Qualifiers](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/dependency-injection/dependency-qualifiers.md) — Distinguishes between multiple bindings of the same type by using unique labels or identifiers to ensure the correct dependency instance is selected. ([source](https://dagger.dev/dev-guide))
- [Dependency Aggregators](https://awesome-repositories.com/f/software-engineering-architecture/dependency-aggregators.md) — The framework collects several related objects into a single group or map to inject them collectively without needing direct references to each individual item. ([source](https://dagger.dev/api/latest/))
- [Custom Binding Definitions](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/dependency-injection/custom-binding-definitions.md) — Declares dependencies for interfaces, third-party classes, or configurable objects that cannot be automatically identified or injected through standard annotation scanning. ([source](https://dagger.dev/users-guide))
- [Optional Dependency Handlers](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/dependency-injection/optional-dependency-handlers.md) — Enables components to function when certain dependencies are missing by injecting wrappers that indicate whether a specific binding is currently available. ([source](https://dagger.dev/dev-guide))
- [Performance Optimization](https://awesome-repositories.com/f/software-engineering-architecture/performance-reliability/performance-optimization.md) — Improves startup speed and memory usage by controlling object lifecycles and delaying the instantiation of heavy resources.
- [Testing Utilities](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/dependency-injection/testing-utilities.md) — Provides specialized utilities to configure and inject dependencies within local or instrumentation test environments. ([source](https://dagger.dev/api/latest/))
- [Binding Caching Strategies](https://awesome-repositories.com/f/software-engineering-architecture/performance-optimization-resources/binding-caching-strategies.md) — Limits object instantiation frequency by caching bindings within specific components to reduce memory overhead. ([source](https://dagger.dev/users-guide))

### Development Tools & Productivity

- [Build-Type Provisioning](https://awesome-repositories.com/f/development-tools-productivity/environment-configuration-management/build-type-provisioning.md) — The framework defines and provisions different object implementations for specific build types to ensure the correct logic runs in testing, debug, or production environments. ([source](https://dagger.dev/hilt))
- [Lazy Providers](https://awesome-repositories.com/f/development-tools-productivity/dependency-resolution/lazy-providers.md) — Wraps dependencies in functional interfaces to defer object creation until the exact moment they are requested by the application.
- [Lazy Initialization](https://awesome-repositories.com/f/development-tools-productivity/lazy-initialization.md) — Delays the instantiation of dependencies until they are explicitly requested to improve application startup speed. ([source](https://dagger.dev/dev-guide))

### DevOps & Infrastructure

- [Metadata-Driven Dependency Injection](https://awesome-repositories.com/f/devops-infrastructure/dependency-management/dependency-injection-systems/metadata-driven-dependency-injection.md) — Uses metadata markers on constructors and fields to identify injection points and define how objects are provisioned.
- [Dependency-Injected Configurations](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/dynamic-runtime-injectors/dependency-injected-configurations.md) — The framework injects runtime data or configuration values into the dependency graph by passing them directly through the component builder during the initialization phase. ([source](https://dagger.dev/dev-guide))

### Programming Languages & Runtimes

- [Scoped Lifecycle Managers](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/language-specific-resources/language-tutorials/c-c-tutorials/object-management/scoped-lifecycle-managers.md) — Manages object lifecycles by storing instances within specific component containers to control memory usage and ensure proper reuse. ([source](https://dagger.dev/dev-guide))
- [Directed Acyclic Graphs](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-structures/directed-acyclic-graphs.md) — Organizes object dependencies into a structured hierarchy to ensure all required components are instantiated in the correct order.

### Testing & Quality Assurance

- [Binding Replacements](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/binding-replacements.md) — Swaps production dependency bindings with test-specific implementations to simplify the verification of code during automated testing. ([source](https://dagger.dev/hilt))
