Skip to content
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

Add support for new Dagger Kotlin features #185

Open
2 tasks
JakeWharton opened this issue Jan 30, 2020 · 4 comments
Open
2 tasks

Add support for new Dagger Kotlin features #185

JakeWharton opened this issue Jan 30, 2020 · 4 comments

Comments

@JakeWharton
Copy link
Owner

  • Not requiring module instance for provision methods in an object.
  • Automatically traversing into module companion objects to look for provision methods (built on above support)
@emartynov
Copy link

I just run recently to the point one - added methods in the component builder for object modules.

@realdadfish
Copy link

Care to give some implementation hints where to start? I'd try and pick this one up.

@JakeWharton
Copy link
Owner Author

Both will be changes to ReflectiveModuleParser. The easiest way to get started is to get a failing test case in the integration tests that passes on the codegen backend. Then you can debug through as it's parsing the module to see how to read and handle these new Kotlin method shapes.

@catellie
Copy link

catellie commented Nov 5, 2020

In my experience of this, you can get the Kotlin code to work with dagger-reflect by adding @JvmStatic to the @provides functions in the companion object. Whether this solves ALL aspects is still unclear since I never got to the stage where things actually run, but at least it appears to do the right thing when examine the results in the debugger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants