Check if Library is used in Android app

后端 未结 4 1184
迷失自我
迷失自我 2021-02-12 09:55

I received some legacy code of app (not developed by me, but by some other team, with no documentation), which has almost 20+ dependencies, in build.gradle.

4条回答
  •  深忆病人
    2021-02-12 10:52

    Instead of commenting out all dependencies I would go the other way around - comment out one dependency at a time and see what breaks. This way you would also get a grasp of use-cases of all dependencies because the IDE will point you to the place where code broke. If nothing breaks after commenting out a dependency you'll know that it's not used. Another thing you could potentially do is analyze an unobfuscated release .apk where all unused dependencies will be missing but package structure will be preserved.

提交回复
热议问题