remove unused classes with proguard for Android

前端 未结 2 1189
星月不相逢
星月不相逢 2021-02-04 20:16

History/Context I have a project[1] where size really matters - recently I moved stuff to a shared lib[2] and thought proguard will take care and remove the unu

2条回答
  •  终归单人心
    2021-02-04 21:20

    I believe you have to use -injars:

    -injars class_path Specifies the input jars (or wars, ears, zips, or directories) of the application to be processed. The class files in these jars will be processed and written to the output jars. By default, any non-class files will be copied without changes. Please be aware of any temporary files (e.g. created by IDEs), especially if you are reading your input files straight from directories. The entries in the class path can be filtered, as explained in the filters section. For better readability, class path entries can be specified using multiple -injars options.

    Source: http://proguard.sourceforge.net/index.html#manual/usage.html

提交回复
热议问题