Skip to content

Commit

Permalink
Make application component Factory a nested interface
Browse files Browse the repository at this point in the history
  • Loading branch information
kingsleyadio committed Jan 10, 2022
1 parent d6afb3f commit 05eb985
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import javax.inject.Singleton
@Singleton
public interface ApplicationComponent {
public fun getMembersInjectorMap(): MembersInjectorMap
}

/**
* Interface for creating an [ApplicationComponent].
*/
public interface ApplicationComponentFactory {
public fun create(@BindsInstance application: Application): ApplicationComponent
/**
* Interface for creating an [ApplicationComponent].
*/
public interface Factory {
public fun create(@BindsInstance application: Application): ApplicationComponent
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
package com.deliveryhero.whetstone.component

/**
* Interface that should be implemented by the [android.app.Application] to supply
* the instance of the root [ApplicationComponent].
*
* It's strongly recommended that [applicationComponent] always returns the same
* instance across multiple invocations.
*/
public interface ApplicationComponentOwner {

public val applicationComponent: ApplicationComponent
Expand Down

0 comments on commit 05eb985

Please sign in to comment.