
You’re not required to implement any of the methods in AppGlideModule for the API to be generated. Package import .GlideModule import .AppGlideModule public final class MyAppGlideModule extends AppGlideModule Include a AppGlideModule implementation in your application: To use the generated API in your application, you need to perform two steps:Īdd a dependency on Glide’s annotation processor As a result it’s not possible to generate the API for a library without precluding any application that uses the library from using the generated API. There can only be one AppGlideModule per application. The API is only generated when a properly annotated AppGlideModule is found. The generated API is only available for applications. Only the extensions mentioned on this page are targeted for eventual removal. The configuration options, including LibraryGlideModule and AppGlideModule are not deprecated and will continue to be used. Since that’s now trivial to do with extension functions in Kotlin, the API extensions should be considered deprecated. Glide originally added a generated API that made it easy to extend RequestOptions. Applications can extend Glide’s API by adding methods that bundle commonly used options.Integration libraries can extend Glide’s API with custom options.Glide v4 uses an annotation processor to generate an API that allows applications to extend Glide’s API and include components provided by integration libraries. However we do not plan to add support for the generated API to Glide’s KSP integration or add additional related functionality in the future. In practice there’s no plan to remove support for the generated API from Glide’s Java based annotation processor. Generating the classes ( GlideApp, GlideRequests etc) adds build time and complexity in Glide’s annotation processors.Extensions can be trivially replicated in Kotlin using extension functions with no additional support from Glide.Extensions, the other functionality added by this API, seem to be rarely used.Glide 4.9.0 integrated RequestOptions into RequestBuilder using inheritance instead of code gen.Configuration using these classes and annotation processing is NOT deprecated. You should continue to use the annotation processors and AppGlideModule or LibraryGlideModule classes as necessary to configure Glide. Instead of GlideOptions, use .RequestOptions.Use the equivalent non-generated classes instead: You should not add new Extensions as described on this page.Glide’s annotation processors will continue to be used for configuration. The generated API is deprecated as of Glide 4.14.0. This page and the generated API are deprecated This page and the generated API are deprecated.
