gradle - How to disable Proguard settings for an external dependency jar? -


my project consists of 2 modules - application , library. library, in turn, includes (via "compile") jar (whose classes referenced directly in application well).

questions:

  1. how should configure proguard run on app, on library not on included jar?
  2. should put proguard settings in build.gradle library?
  3. should put respect jar in build.gradle app?

currently, have in app:

    buildtypes {       release {         debuggable false         zipalign true         runproguard true         proguardfile 'proguard-rules.txt'         proguardfile getdefaultproguardfile('proguard-android-optimize.txt')         signingconfig signingconfigs.release 

  1. it's not possible @ moment exclude dependency when running proguard.

  2. you should proguard library if want obfuscate parts of it. useful if want offer part of public api. definitively not want remove dead code, since don't know used or not.

  3. on app side, don't need put special, unless library code requires not obfuscate specific class. if that's case should publish library app uses automatically. there's sample called libproguardconsumerfiles shows how using consumerproguardfiles properties. include proguard rule file in library packaging used whomever consumes library.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -