bumptech / bumptech/glide

Glide without generated API

Open
#3,556 5 comments 6 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

Now that 4.9 API is fluent and works nice it would be nice to offer a way to configure Glide without using private API.

Kapt is slow, incremental code does not really works with kotlin and you generate java code slowing down more the builds :(

My proposal is simple and safe:

```
public static synchronized void init(@NonNull Context context, @NonNull GlideBuilder builder) {
if (Glide.glide != null) {
throw new IllegalStateException("Glide is already initialized and can't be configured again.");
}
initializeGlide(context, builder);
}
```
Since it's synchronized and can't be called if already init, this does not generate any issue other that if the user provide wrong builder but this happens also with the generated module.

cc @sjudd

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.