Generate minimized jar with only used classes

前端 未结 4 1265
失恋的感觉
失恋的感觉 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:13

    In general it is not possible to automatically select all classes that are used by an application. Just think about what we can do with Class.forName(String name) or if we use a dependency injection container and declare types in external configuration files.

提交回复
热议问题