Skip to content

Instantly share code, notes, and snippets.

@stantronic
Last active May 27, 2022 10:17
Show Gist options
  • Save stantronic/1fd7c313979f40e5a071bcc9b12c6ee9 to your computer and use it in GitHub Desktop.
Save stantronic/1fd7c313979f40e5a071bcc9b12c6ee9 to your computer and use it in GitHub Desktop.

Revisions

  1. stantronic revised this gist May 27, 2022. 1 changed file with 11 additions and 8 deletions.
    19 changes: 11 additions & 8 deletions Hilt_and_Dagger.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,14 @@
    *Module* - a recipe for how to make a thing
    *Component* - a kitchen that "cooks up" things according to the recipes
    *Scope* - the lifetime of the things created
    *EntryPoint* - a place which has its own kitchen
    # Terminology

    * *Module* - a recipe for how to make a thing
    * *Component* - a kitchen that "cooks up" things according to the recipes
    * *Scope* - the lifetime of the things created
    * *EntryPoint* - a place which has its own kitchen

    `@Inject` - I can be injected, and things can be injected into me
    `@Binds` - When a consumer asks for this interface, inject this implementation
    `@Provides` - this function shows how to make this thing
    `@AndroidEntryPoint` - use on Activies and Fragments to turn them into EntryPoints
    # Annotations

    * `@Inject` - I can be injected, and things can be injected into me
    * `@Binds` - When a consumer asks for this interface, inject this implementation
    * `@Provides` - this function shows how to make this thing
    * `@AndroidEntryPoint` - use on Activies and Fragments to turn them into EntryPoints

  2. stantronic revised this gist May 27, 2022. 2 changed files with 11 additions and 11 deletions.
    11 changes: 11 additions & 0 deletions Hilt_and_Dagger.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    *Module* - a recipe for how to make a thing
    *Component* - a kitchen that "cooks up" things according to the recipes
    *Scope* - the lifetime of the things created
    *EntryPoint* - a place which has its own kitchen


    `@Inject` - I can be injected, and things can be injected into me
    `@Binds` - When a consumer asks for this interface, inject this implementation
    `@Provides` - this function shows how to make this thing
    `@AndroidEntryPoint` - use on Activies and Fragments to turn them into EntryPoints

    11 changes: 0 additions & 11 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,11 +0,0 @@
    Module - a recipe for how to make a thing
    Component - a kitchen that "cooks up" things according to the recipes
    Scope - the lifetime of the things created
    EntryPoint - a place which has its own kitchen


    @Inject - I can be injected, and things can be injected into me
    @Binds - When a consumer asks for this interface, inject this implementation
    @Provides - this function shows how to make this thing
    @AndroidEntryPoint - use on Activies and Fragments to turn them into EntryPoints

  3. stantronic created this gist May 27, 2022.
    11 changes: 11 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    Module - a recipe for how to make a thing
    Component - a kitchen that "cooks up" things according to the recipes
    Scope - the lifetime of the things created
    EntryPoint - a place which has its own kitchen


    @Inject - I can be injected, and things can be injected into me
    @Binds - When a consumer asks for this interface, inject this implementation
    @Provides - this function shows how to make this thing
    @AndroidEntryPoint - use on Activies and Fragments to turn them into EntryPoints