-
-
Notifications
You must be signed in to change notification settings - Fork 699
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
Availability For JAVA #81
Comments
Hello, the interest of Koin is in its ease of use. Check the gists where I put Koin for a Java app: https://gist.github.com/arnaudgiuliani/446e0d8ee79f4bda38b3057b01098f2e |
I have used it in java. But injection was not done by java code. I have implemented base Kotlin class that I extended in java. Kotlin class was doing the injection and I could use it in java code. It looked like this:
and then I have extended this class by java:
|
Here there are some utility functions to inject koin components and properties in java. Check it out: |
@fredy-mederos looks like a very good solution. Could you also provide a snippet that shows how injection looks on java site? |
Example in java: MyManager myManager = KoinJavaUtils.get(MyManager.class); You can use it in attributes and you can also use the function I wrote those utility functions to migrate from dagger2 some Android java activities that I can't convert to kotlin and it works good! |
Good job @fredy-mederos! Could be a good contribution and blog post about it 👍 |
Thanks! |
I close the issue here to continue on PR. Thanks |
Can this be ported to java. Seems better than the dagger hanging over my head.
The text was updated successfully, but these errors were encountered: