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

[KSP2] Hilt incompatibility: Did you forget to apply the Gradle Plugin? #1841

Open
SimonMarquis opened this issue Apr 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working processor errors reported by processors.

Comments

@SimonMarquis
Copy link

KSP tasks are failing because of a Hilt error when building with Kotlin 2.0.0-RC1 and KSP2 enabled:

  • SimonMarquis/QrCode
    > Task :app:kspDebugKotlin
    e: [ksp*** [Hilt*** Class java.lang.Object is not annotated with @AssistedFactory.
    [Hilt*** Processing did not complete. See error above for details.
    e: [ksp*** [Hilt*** Expected @AndroidEntryPoint to have a value. Did you forget to apply the Gradle Plugin? (com.google.dagger.hilt.android)
    See https://dagger.dev/hilt/gradle-setup.html
    [Hilt*** Processing did not complete. See error above for details.
    e: [ksp*** [Hilt*** Expected @AndroidEntryPoint to have a value. Did you forget to apply the Gradle Plugin? (com.google.dagger.hilt.android)
    See https://dagger.dev/hilt/gradle-setup.html
    [Hilt*** Processing did not complete. See error above for details.
    e: [ksp*** [Hilt*** Expected @HiltAndroidApp to have a value. Did you forget to apply the Gradle Plugin? (com.google.dagger.hilt.android)
    See https://dagger.dev/hilt/gradle-setup.html
    
  • android/nowinandroid
    > Task :ui-test-hilt-manifest:kspDemoDebugKotlin FAILED
    e: [ksp] [Hilt] Expected @AndroidEntryPoint to have a value. Did you forget to apply the Gradle Plugin? (com.google.dagger.hilt.android)
    See https://dagger.dev/hilt/gradle-setup.html
    [Hilt] Processing did not complete. See error above for details.
    
    > Task :core:analytics:kspDemoDebugKotlin FAILED
    e: [ksp] java.lang.NullPointerException: null cannot be cast to non-null type androidx.room.compiler.processing.XType
    
    This stacktrace also contains an error referenced in this KSP issue:
@SimonMarquis SimonMarquis changed the title [KSP2] Incompatible with Hilt: Did you forget to apply the Gradle Plugin? [KSP2] Hilt incompatibility: Did you forget to apply the Gradle Plugin? Apr 17, 2024
@ting-yuan ting-yuan added bug Something isn't working processor errors reported by processors. labels Apr 24, 2024
@ting-yuan ting-yuan added this to the 2.0 milestone Apr 24, 2024
@ting-yuan
Copy link
Collaborator

@SimonMarquis Could you file the bug to Hilt and let them identify which part of KSP API is wrong first? We have very little knowledge of what those error messages mean and how they are thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working processor errors reported by processors.
Projects
None yet
Development

No branches or pull requests

2 participants