-
Notifications
You must be signed in to change notification settings - Fork 918
Update u2020 to u2021 #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
16 changes: 0 additions & 16 deletions
16
src/debug/java/com/jakewharton/u2020/DebugU2020Module.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package com.jakewharton.u2020; | ||
|
|
||
| import com.jakewharton.u2020.data.DebugDataModule; | ||
| import com.jakewharton.u2020.ui.DebugUiModule; | ||
|
|
||
| import dagger.Component; | ||
| import javax.inject.Singleton; | ||
|
|
||
| /** | ||
| * The core debug component for u2020 applications | ||
| */ | ||
| @Singleton | ||
| @Component(modules = { U2020AppModule.class, DebugUiModule.class, DebugDataModule.class }) | ||
| public interface U2020Component extends U2020Graph { | ||
| /** | ||
| * An initializer that creates the graph from an application. | ||
| */ | ||
| final static class Initializer { | ||
| static U2020Graph init(U2020App app) { | ||
| return Dagger_U2020Component.builder() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be updated with the new naming convention |
||
| .u2020AppModule(new U2020AppModule(app)) | ||
| .build(); | ||
| } | ||
| private Initializer() {} // No instances. | ||
| } | ||
| } | ||
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package com.jakewharton.u2020; | ||
|
|
||
| import android.app.Application; | ||
| import dagger.Module; | ||
| import dagger.Provides; | ||
| import javax.inject.Singleton; | ||
|
|
||
| @Module | ||
| public final class U2020AppModule { | ||
| private final U2020App app; | ||
|
|
||
| public U2020AppModule(U2020App app) { | ||
| this.app = app; | ||
| } | ||
|
|
||
| @Provides @Singleton Application provideApplication() { | ||
| return 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package com.jakewharton.u2020; | ||
|
|
||
| import com.jakewharton.u2020.ui.MainActivity; | ||
| import com.jakewharton.u2020.ui.gallery.GalleryView; | ||
| import dagger.Component; | ||
| import javax.inject.Singleton; | ||
|
|
||
| /** | ||
| * A common interface implemented by both the Release and Debug flavored components. | ||
| */ | ||
| public interface U2020Graph { | ||
| void inject(U2020App app); | ||
| void inject(MainActivity activity); | ||
| void inject(GalleryView view); | ||
| } |
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this requirement documented anywhere on the Dagger project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add it. It's only for Java 6 users which Android falls under :(
On Nov 11, 2014 2:18 AM, "Prateek Srivastava" notifications@github.com
wrote:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we also should add gradle instructions in general, and android
specific instructions, but that should go in an issue on the dagger project.
On Tue Nov 11 2014 at 8:45:54 AM Jake Wharton notifications@github.com
wrote:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better/cleaner/more elegant to use
'javax.annotation:javax.annotation-api:1.2'? Theorg.glassfishgroup and the weird version number don't feel good, but maybe it's just me.