Skip to content
Discussion options

You must be logged in to vote

Is there a way to solve this structure?

It should be possible to use ContributesGraphExtension on the contributed graph and then manually make the target graph implement its factory (rather than contributing its factory to a general scope)

@ContributesGraphExtension(...)
interface FragmentSubComponent1 {
  interface Parent {
    ...
  }
}

interface ActivitySubComponent1 : FragmentSubComponent1.Parent

The parent graph processing should recognize that Parent's inherited creator function returns a contributed graph and thus create the graph still. Somewhat similar to how Dagger will special-case accessors that return subcomponents or subcomponent creators.

This isn't a case with a test cu…

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
8 replies
@mateherber
Comment options

@mateherber
Comment options

@ZacSweers
Comment options

@mateherber
Comment options

@mateherber-jt
Comment options

Answer selected by mateherber
Comment options

You must be logged in to vote
2 replies
@mateherber
Comment options

@ZacSweers
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants