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

Android Gradle plugin doesn't work in KMP modules #4130

Closed
ARTI1208 opened this issue Nov 4, 2023 · 3 comments
Closed

Android Gradle plugin doesn't work in KMP modules #4130

ARTI1208 opened this issue Nov 4, 2023 · 3 comments

Comments

@ARTI1208
Copy link

ARTI1208 commented Nov 4, 2023

I've used dagger for DI in Android inside kotlin multplatform modules. However, updating dagger from 2.46.1 to versions 2.47 and later ones produces compile time errors

Expected @AndroidEntryPoint to have a value. Did you forget to apply the Gradle Plugin?

I didn't find any information related to this in release notes or any other place. Did dagger plugin dropped support for kmp modules?

@kuanyingchou
Copy link
Collaborator

Hi, @ARTI1208 , I just tried out Hilt in a KMP project but couldn't reproduce. Do you use @AndroidEntryPoint? And if so can you confirm that Hilt Gradle Plugin is applied?

@ARTI1208
Copy link
Author

ARTI1208 commented Nov 11, 2023

Yes, I use @AndroidEntryPoint and plugin is applied (if it wasn't then how it could work with 2.46.1?)
I made a simple project ( similar to my actual one) with the error? please take a look https://github.com/ARTI1208/DaggerPluginFailRepro. You can return 2.46.1 in buildSrc/build.gradle.kts to test that it worked with that version

@kuanyingchou
Copy link
Collaborator

Hi, @ARTI1208 , thanks for the repro. This is indeed a regression in Hilt Gradle Plugin. We've submitted a fix and it will be included in the next Dagger release.

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

2 participants