google / dagger

A fast dependency injector for Android and Java.
https://dagger.dev
Apache License 2.0
17.42k stars 2.01k forks source link

Public website talks about unreleased feature #694

Closed benjaminplee closed 7 years ago

benjaminplee commented 7 years ago

The dagger website, https://google.github.io/dagger/android.html, mentions a nice convenience method for new the dagger.android features to simply setup for most users but this isn't in the latest 2.10 release. @ronshapiro what is the status of the work with the ContributesAndroidInjector annotation? It looks to be on master only.

Pro-tip: If your subcomponent and its builder have no other methods or supertypes than the ones mentioned in step #2, you can use @ContributesAndroidInjector to generate them for you. Instead of steps 2 and 3, add an abstract module method that returns your activity, annotate it with @ContributesAndroidInjector, and specify the modules you want to install into the subcomponent. If the subcomponent needs scopes, apply the scope annotations to the method as well.

I would really like this feature as we have a good set of base architecture using an older dagger2 version setup for our last app which was good at reducing boilerplate for new activity setup, but had some other deficiencies.

Is there a Dagger roadmap for v2.11 (or future) where this is planned or anything I can do to help get this ready for prime time?

Issue #691 makes this unfortunate since quick testing with the current snapshot is missing. Also, FYI, there are some 404s on the Javadocs referenced for that page for version "latest" too.

JakeWharton commented 7 years ago

This is effectively a dupe of https://github.com/google/dagger/issues/581 and is because of how the sync works (see https://github.com/google/dagger/issues/581#issuecomment-280064012)

ronshapiro commented 7 years ago

Should be released by the end of the week

benjaminplee commented 7 years ago

@JakeWharton Good catch. My search missed that.

JakeWharton commented 7 years ago

I only knew it existed because I follow all the issues. Took a few searches to find!

On Wed, Apr 12, 2017, 10:14 PM Benjamin Lee notifications@github.com wrote:

@JakeWharton https://github.com/JakeWharton Good catch. My search missed that.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/google/dagger/issues/694#issuecomment-293757842, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEEXONF9Cl4Tm4ne5ThM6syautXNjZks5rvYUhgaJpZM4M8KDd .