Skip to content

Dexcounter. For counting methods. For Dex files.

Notifications You must be signed in to change notification settings

dhleong/dexcounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dexcounter

For counting methods. For Dex files.

What?

Dexcounter is a CLI tool for checking how many methods a library will add to your dex file if you include it. It is inspired by the old methodscount.com service, and borrows some of its tricks.

How?

Dexcounter is written in Go, so you can go get it:

go get -u github.com/dhleong/dexcounter

Then, just pass the gradle-style dependency string like so:

dexcounter io.reactivex.rxjava2:rxkotlin:2.2.0

and off it goes! dexcounter fetches a gradle environment (from this repo) to resolve the library's dependencies, uses the dx tool to count the method references in all of them, and adds them all together. Its output currently looks something like this:

io.reactivex.rxjava2:rxkotlin:2.2.0 TOTALS:
 Methods: 17277
  Fields: 6299

Dependency                                    Methods  Fields
io.reactivex.rxjava2:rxkotlin:2.2.0               679     126
  io.reactivex.rxjava2:rxjava:2.1.6             10276    5410
  org.jetbrains.kotlin:kotlin-stdlib:1.1.60      6291     741
  org.reactivestreams:reactive-streams:1.0.1        7       0
  org.jetbrains:annotations:13.0                   24      22

About

Dexcounter. For counting methods. For Dex files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages