Last active
November 7, 2017 19:14
-
-
Save rachitmishra/326ef53cf727487677b841c3c30d760e to your computer and use it in GitHub Desktop.
dagger-app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Building `ComputerComponent` and getting a dependency | |
*/ | |
class ComputerApp { | |
@Inject lateinit var computer: Computer | |
} | |
fun main(args: Array<String>) { | |
val computerComponent = DaggerComputerComponent | |
.builder() | |
.computerModule(ComputerModule(1024, 1024)) | |
.build() | |
val computer = computerComponent.getComputer() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment