Generate minimized jar with only used classes

前端 未结 4 1267
失恋的感觉
失恋的感觉 2021-01-17 11:44

I\'m in need of creating the minimal jar of utils library for use in Android. I\'m using some methods from apache commons libraries (such as IOUtils, Stri

4条回答
  •  悲哀的现实
    2021-01-17 12:40

    Excuse me, maybe i not clearly understood question. Obfuscator tool (i.e. ProGuard) could do that, isn't it? It packs several JARs into one and strips unused classes. If you don't need obfuscation/optimization (to prevent unwanted side-effects) then you could disable them, leaving "shrink" phase enabled.

提交回复
热议问题