Building library module. And in the sample application which is using the library module it has
@GlideModule
class DPAppGlideModule : AppGlideModule() {
override fun isManifestParsingEnabled(): Boolean {
return false
}
}
and in the library module has:
@GlideModule
public final class LibGlideModule extends LibraryGlideModule {
}
and in the library module it is using the GlideApp the generated api
fun ImageView.loadImg(imageUrl: String) {
var requestOptions : RequestOptions = RequestOptions()
requestOptions.diskCacheStrategy(DiskCacheStrategy.ALL)
if (!TextUtils.isEmpty(imageUrl)) {
GlideApp.with(this.context)
.setDefaultRequestOptions(requestOptions)
.load(imageUrl)
.into(this)
}
}
But since this is the library module and cannot have decency on the application module, so it cannot compile
How to use the GlideApp generated api in the library module?
ref — https://bumptech.github.io/glide/doc/configuration.html