-
Notifications
You must be signed in to change notification settings - Fork 2k
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] Dagger and Hilt incompatibility with KSP2 #4303
Comments
Did you forget to apply the Gradle Plugin?
Dagger / HIlt currently does not support KSP2 as we are still working through the various breaking changes in the APIs. Moreover, the underlying processing library used by Dagger and Hilt (called XProcessing) needs to also be migrated, tracking issue is https://issuetracker.google.com/314151707 |
@danysantiago I assume that you are aware of this, but for transparency reasons I wanted to point out that KSP1 will not be supported with Kotlin 2.1:
Referring to the Kotlin documentation we can expect Kotlin 2.1 at the end of the year (Nov/Dec 2024).
|
It also prevents using the latest Open JDK (22) as that is only compatible with Kotlin 2.0 |
@ber4444 Seems like you are mixing up things. KSP2 is still in beta and not used by default, no matter if you use Kotlin 1.x or Kotlin 2.0. This will only change once Kotlin 2.1 will be released (see #4303 (comment)). Just take a look at the KSP1 Deprecation Schedule. |
The plugin does per-variant / per-platform configuration by adding a CommandLineArgumentProvider to the KSP task, with KSP2 the task class is different and does not implement the KSP1 base class. This CL updates the plugin integration to find and also configure the KSP2 task. Fixes #4303 RELNOTES=Upgrade Hilt Gradle Plugin to support KSP2 configuration. PiperOrigin-RevId: 707986696
The plugin does per-variant / per-platform configuration by adding a CommandLineArgumentProvider to the KSP task, with KSP2 the task class is different and does not implement the KSP1 base class. This CL updates the plugin integration to find and also configure the KSP2 task. Fixes #4303 RELNOTES=Upgrade Hilt Gradle Plugin to support KSP2 configuration. PiperOrigin-RevId: 707986696
The plugin does per-variant / per-platform configuration by adding a CommandLineArgumentProvider to the KSP task, with KSP2 the task class is different and does not implement the KSP1 base class. This CL updates the plugin integration to find and also configure the KSP2 task. Fixes #4303 RELNOTES=Upgrade Hilt Gradle Plugin to support KSP2 configuration. PiperOrigin-RevId: 707986696
Original issue reported on KSP google/ksp#1841
KSP tasks are failing because of a Hilt error when building with Kotlin 2.0.0-RC1 and KSP2 enabled:
The text was updated successfully, but these errors were encountered: