I'd like to use proguard on my library, but the file (rules) should be set inside the library. That means I don't want to set the rules w(hich belong to the library) explicitly in my app module.
I found that there is something like consumerProguardFiles property. My settings:
library gradle:
buildTypes {
debug {
debuggable true
minifyEnabled false
}
release {
minifyEnabled true
consumerProguardFiles 'proguard-rules.pro'
}
}
app gradle:
buildTypes {
debug {
applicationIdSuffix ".debug"
debuggable true
minifyEnabled false
signingConfig signingConfigs.debug
}
release {
debuggable false
minifyEnabled true
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Why does configuration above doesn't work? I get errors that packages/symbols from the library cannot be found.
Edited:
What is important my proguard-rules.pro for the library and proguard-rules.pro for the main app module are both empty.
Exemplary errors:
Error:(3, 60) error: package (my library package here) does not exist
(...)
Error:(16, 9) error: cannot find symbol class NavigationStructureModel
(...)
More then one handrued errors. As I can see my all classes from the library are missing.