bumptech / glide

An image loading and caching library for Android focused on smooth scrolling

Home Page:https://bumptech.github.io/glide/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@GlideModule annotated classes must implement AppGlideModule

manishindiainc opened this issue · comments

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

Any thought would be great help.

Team, could you please help with this

Team, I'm facing this similar issue. Please provide any solution.

Team, blocked on this, please provide a solution.

i am also facing the same issue.

Any update?