The build.gradle
of one of the modules in my project is pretty simple:
apply plugin: 'com.android.library'
android {
compileSdkVersion 8
buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 8
targetSdkVersion 8
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
}
}
dependencies {
compile project(':timsvc')
compile files('libs/jsoup-1.8.2.jar')
}
However, when I build it, it fails to find symbols in the external library jsoup-1.8.2.jar
.
Since timsvc
is a module of mine, having its own build.gradle and proguard.cfg, I can control its minify level, and so I don't have any problems with it.
But I cannot do the same for jsoup-1.8.2.jar
because it is an externally provided jar.
Is there a way to exclude it from Proguard in Android Studio?
If so, how do I accomplish that?
The best is to see the libraries documentations and readme page (like Github).
but in genneral you can add -keep options to your proguard configuration file for the classes in those external jars. For instance:
-keep class example.** { *; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With