Skip to content
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

GeneratedAppGlideModuleImpl generated by ksp 'isManifestParsingEnabled' is always false #5414

Open
gengzhe opened this issue May 31, 2024 · 0 comments

Comments

@gengzhe
Copy link

gengzhe commented May 31, 2024

Glide Version: 4.16.0

Integration libraries: no

Device/Android Version: android 13

Issue details / Repro steps / Use case background:
I upgraded kapt to ksp however the 'isManifestParsingEnabled' of the generated class no longer depends on

public boolean isManifestParsingEnabled() {
    return true;
  }

but always returns false.

internal class GeneratedAppGlideModuleImpl(
  @Suppress("UNUSED_PARAMETER")
  context: Context,
) : GeneratedAppGlideModule() {
  private val appGlideModule: MyAppGlideModule
  init {
    appGlideModule = MyGlideModule()
  }

  public override fun registerComponents(
    context: Context,
    glide: Glide,
    registry: Registry,
  ) {
    GlideModule().registerComponents(context, glide, registry)
    glideModule.registerComponents(context, glide, registry)
  }

  public override fun applyOptions(context: Context, builder: GlideBuilder) {
    appGlideModule.applyOptions(context, builder)
  }

// it is always false it not depends on 'appGlideModule' anymore 
  public override fun isManifestParsingEnabled(): Boolean = false
}

Glide load line / GlideModule (if any) / list Adapter code (if any):
I am using manifest for parsing glide module, but it doesn't work if i use ksp.

@GlideModule
class MyAppGlideModule : AppGlideModule() {

    override fun isManifestParsingEnabled(): Boolean {
        return true
    }

    override fun registerComponents(
            context: Context, glide: Glide, registry: Registry
    ) {
        registry.register(SVG::class.java, PictureDrawable::class.java, SvgDrawableTranscoder())
                .append(InputStream::class.java, SVG::class.java, SvgDecoder())
    }
}

<meta-data
            android:name="com.XXX.AppGlideModule"
            android:value="GlideModule" />

Layout XML:

Stack trace / LogCat:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant