I use JEXL library in my app and it seems like the new Android class shrinker fails to process it.
Here is my dependency:
compile 'org.apache.commons:commons-jexl:2.1.1'
My build type is defined as follows:
debug {
versionNameSuffix "-dev"
minifyEnabled true
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
And when I try to build it I get this error:
What went wrong: Execution failed for task ':app:transformClassesWithNewClassShrinkerForDebug'.
com.android.build.gradle.shrinker.ClassLookupException: Invalid class reference: javax/script/AbstractScriptEngine
Although it builds without any problems if I enable useProguard option or set both minifyEnabled and useProguard to false
I am aware that javax.script used by JEXL internally is not available on Android but the parts I use work pretty good so I have no problems with using this library except that. Lint also raises InvalidPackage type of error for that reason but it can be easily disabled and not hurt the build process.
Is it possible to make new shrinker ignore it and proceed to the next steps like Lint does?