0

I develop an android app and now have quite a bunch of dependencies in my build.gradle.
Is there some way to detect where a certain library is used?
Or alternatively a way to automatically find unused libs?
I do use proguard to remove unused bytecode but removing the unused before compilation would speed things up and clean up the build.gradle

binarynoise
  • 364
  • 3
  • 14
  • That's pretty much your job to track which ones are being used... Otherwise I suggest removing them one by one to see if it builds without it. – Nicolas May 08 '20 at 15:36
  • Commenting our dependencies one by one and try to recompile will not be an option for me – binarynoise May 08 '20 at 15:36
  • This also comes from libs that say I need to include other libs, and in the end you loose track of everything – binarynoise May 08 '20 at 15:37
  • The only other recommendation I have would be to use proguard to shrink but not obfuscate the APK. Then, with the APK analyser, you can see which package names remain. For those that aren't there you can remove the related dependency. – Nicolas May 08 '20 at 15:39
  • 1
    check this https://stackoverflow.com/questions/19379517/how-to-find-remove-unused-dependencies-in-gradle – Oussèma Hassine May 08 '20 at 16:00
  • @OussèmaHassine excactly what I was looking for. Just didn't find it here and at google. Would you mind creating an answer referring to this? – binarynoise May 08 '20 at 16:35

0 Answers0