You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling an Android app with this configuration, and the following Application class (we still rely on the DaggerApplication for legacy dagger graph):
@HiltAndroidApp
classMyApp : DaggerApplication()
leads to the following error:
> Task :app:kspReleaseKotlin
e: [ksp] @Inject fields may not be final - androidInjector in dagger.android.DaggerApplication
This issue seems like a bug in KSP2 or XProcessing library, as Dagger just looks for the final modifier to report this error.
Which version of Kotlin are you using?
Does this issue happen with ksp.useKSP2=false?
Does this issue happen with previous versions of Kotlin/KSP (e.g. Kotlin 2.0.21 and KSP 2.0.21-1.0.28)?
Note that KSP2 is not officially supported with Dagger yet. We're currently in the process of trying to support KSP2; however, there are still many issues/discrepancies with KSP2 compared to KSP1 so we are working with KSP team to address those issues.
I also realize this isn't a great place for users because KSP1 is not really guaranteed to work with Kotlin 2.1.x, so getting KSP2 support enabled is currently one of our top priorities.
Sorry for not mentioning it, but since we are using KSP 2.1.10-1.0.30, we are relying on Kotlin 2.1.10
Does this issue happen with ksp.useKSP2=false?
No, only with ksp.useKSP2=true
Does this issue happen with previous versions of Kotlin/KSP
No idea, I'll try next week some other versions and will report back to you. 🫡
Note that KSP2 is not officially supported with Dagger yet.
I'm well aware, that's why I explicitly mentioned KSP2. I reported it to avoid "re-discovering" this issue when the 1st KSP2-compatible release becomes stable. I'd rather not have to wait for a patch/release cycle 😜
ksp.useKSP2=true
ingradle.properties
Compiling an Android app with this configuration, and the following
Application
class (we still rely on theDaggerApplication
for legacy dagger graph):leads to the following error:
dagger/java/dagger/android/DaggerApplication.java
Line 33 in 3309ac2
The text was updated successfully, but these errors were encountered: