Glide: what about the proguard rules?

Created on 25 Jan 2016  路  6Comments  路  Source: bumptech/glide

I want to proguard my project,But i don't the rules about glide...
Coulue please the proguard rules about glide;Thank you very much

non-library question

All 6 comments

I think you can find what you need here:
https://github.com/bumptech/glide#proguard

than you very much

Thanks @eliomwang, that's enough to make it work.

There're some more details on the following pages:

@TWiStErRob @sjudd ProGuard rules in the readme file haven't been updated with the ones from: https://github.com/bumptech/glide/blob/master/library/proguard-rules.txt

Specifically, yesterday I had a crash because I was missing
-keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder { *** rewind(); }
and eventually found in the file above instead in the readme.

@gajicm93 Hmm, the readme is indeed outdated, but because you don't (shouldn't) need to configure anything:
https://github.com/bumptech/glide/blob/fb672a54e11739454f34430f856a9eeb2ea0244f/library/build.gradle#L42

How are you using Glide in your build.gradle?

@TWiStErRob I'm using it like this:

implementation "com.github.bumptech.glide:glide:$glideVersion"
kapt "com.github.bumptech.glide:compiler:$glideVersion"
implementation "com.github.bumptech.glide:okhttp3-integration:$glideVersion"

I'm also using latest version of R8 in full mode.

My build type is like this:

release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }

And app was crashing on 4.4 until I manually updated ProGuard rules in my rules file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sant527 picture sant527  路  3Comments

billy2271 picture billy2271  路  3Comments

StefMa picture StefMa  路  3Comments

PatrickMA picture PatrickMA  路  3Comments

Anton111111 picture Anton111111  路  3Comments