mihaip / dex-method-counts

Command-line tool to count per-package methods in Android .dex files
Apache License 2.0
2.6k stars 376 forks source link

MultiDex / ART support #16

Closed mttkay closed 8 years ago

mttkay commented 8 years ago

It doesn't appear that the script supports builds that result in multiple dex files, where classes are segmented into a primary dex file and additional dex files. The script reports only 22K methods, which I believe to be merely the methods from the primary dex (mostly our own application minus libraries.)

The Android tool chain will generate multiple DEX files when your minSdkLevel is Lollipop / 21 since that is how ART deals with library code (one dex per dependency), and also when you have the multidex switch enabled.

sschuberth commented 8 years ago

Multi-dex support was added in https://github.com/mihaip/dex-method-counts/commit/a18e3f560d1a70b1c17dfdacaed5bff8025f8eaf and I can confirm that the tool reports more than 64k methods for our mutli-dex APKs.

mttkay commented 8 years ago

Great news, thanks! Any idea yet when this might hit Central? I'm very interested in this enhancement.

Thanks again.

On Tue, Nov 10, 2015, 09:02 Sebastian Schuberth notifications@github.com wrote:

Multi-dex support was added in a18e3f5 https://github.com/mihaip/dex-method-counts/commit/a18e3f560d1a70b1c17dfdacaed5bff8025f8eaf and I can confirm that the tool reports more than 64k methods for our mutli-dex APKs.

— Reply to this email directly or view it on GitHub https://github.com/mihaip/dex-method-counts/issues/16#issuecomment-155351506 .

sschuberth commented 8 years ago

I'm not aware that this project publishes its binaries to Maven Central or Bintray / JCenter at all. There is for example this artifact, but that's not the official release as it seems.

mttkay commented 8 years ago

Ah fair enough. Thanks.

On Tue, Nov 10, 2015, 09:10 Sebastian Schuberth notifications@github.com wrote:

I'm not aware that this project publishes its binaries to Maven Central or Bintray / JCenter. There is for example this artifact https://bintray.com/sloy/maven/dex-method-counts/view, but that's not the official release as it seems.

— Reply to this email directly or view it on GitHub https://github.com/mihaip/dex-method-counts/issues/16#issuecomment-155353601 .