I have started migration of my existing Android app from kapt to ksp and getting an error
[ksp] @GlideModule annotated classes must implement AppGlideModule or LibraryGlideModule:
My Glide Module structure looks like this
// code in my app
@GlideModule
class GlideAppModule : MyGlideModule() {
@Inject lateinit var modelLoaderFactory: GlideUrlLoaderFactory
override fun registerComponents(context: Context, glide: Glide, registry: Registry) {
super.registerComponents(context, glide, registry)
// some specific registration
}
}
// class from platform library, difficult to change
abstract class MyGlideModule : AppGlideModule() {
override fun registerComponents(context: Context, glide: Glide,
registry: Registry) {
// registration common to platform
}
override fun applyOptions(context: Context, builder: GlideBuilder) {
super.applyOptions(context, builder)
// set disk cache
}
}
The MyGlideModule class is from a platform library and is difficult to change. The GlideAppModule is defined in my Android library module app/impl
Now, this inheritance was working perfectly fine with kapt but with ksp, started getting this error
[ksp] @GlideModule annotated classes must implement AppGlideModule or LibraryGlideModule:
Library versions used
com.github.bumptech.glide:ksp:4.16.0 // also tried with 4.14.2 and 4.15.1, same error
kotlin version: 1.9.0
I have started migration of my existing Android app from
kapt
toksp
and getting an error[ksp] @GlideModule annotated classes must implement AppGlideModule or LibraryGlideModule:
My Glide Module structure looks like this
The
MyGlideModule
class is from a platform library and is difficult to change. TheGlideAppModule
is defined in my Android library moduleapp/impl
Now, this inheritance was working perfectly fine with
kapt
but withksp
, started getting this error[ksp] @GlideModule annotated classes must implement AppGlideModule or LibraryGlideModule:
Library versions used
Any thought would be great help.