Closed Jeffset closed 2 years ago
Update:
After further investigation, it seems that the issue has nothing to do with the recent release of rg.jetbrains.kotlinx:kotlinx-metadata-jvm:0.2.0
- SyntheticClass
was there from the start.
Probably the project code is to blame. I'll probably try to debug Dagger processing our diff and post the results here.
The trace shows the SyntheticClass
had to be inspected while validating binding method @Provides
, @Binds
, @Producer
, etc. SyntheticClass
are generated for a few things but the most likely the case you are running into is a binding method ending on a synthetic class because its an interface default method.
Something like this would cause this:
@Module
interface MyModule {
@Provides
fun provide() = "Hello"
}
This issue looks to have been addressed in release 2.34
This issue looks to have been addressed in release 2.34
Modify it to ‘2.34-beta’
dependencies { implementation "com.google.dagger:hilt-android:2.34-beta" kapt "com.google.dagger:hilt-android-compiler:2.34-beta" }
In the stable 2.35 version this problem seems to be solved.
dependencies { implementation "com.google.dagger:hilt-android:2.35" kapt "com.google.dagger:hilt-android-compiler:2.35" }
In the stable 2.35 version this problem seems to be solved.
dependencies { implementation "com.google.dagger:hilt-android:2.35" kapt "com.google.dagger:hilt-android-compiler:2.35" }
this would saved my time and solved the dagger kotlin conflicts thanks alot
Build fails with an exception from kapt processing step:
Dagger version we use is
2.26.1
, but the issue persists on2.32
. Kotlin version is1.4.21
From the basic research I've done, it seems that Dagger still uses old
org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.1.0
library version, while0.2.0
with some new API is released.So the steps to fix this issue, as I see it, are:
org.jetbrains.kotlinx:kotlinx-metadata-jvm
to0.2.0
KotlinClassMetadata.SyntheticClass
(and any other new metadata types) indagger.internal.codegen.kotlin.KotlinMetadata
and possibly adapt its use-sites.