https://github.com/dhleong/dexcounter
Dexcounter. For counting methods. For Dex files.
https://github.com/dhleong/dexcounter
android android-tools dex
Last synced: 7 days ago
JSON representation
Dexcounter. For counting methods. For Dex files.
- Host: GitHub
- URL: https://github.com/dhleong/dexcounter
- Owner: dhleong
- Created: 2018-05-02T22:31:11.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-16T14:01:23.000Z (almost 7 years ago)
- Last Synced: 2024-04-14T05:52:09.898Z (about 2 years ago)
- Topics: android, android-tools, dex
- Language: Go
- Size: 67.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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][1] service, and borrows some of its tricks.
## How?
Dexcounter is written in [Go][2], 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][3]) 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
```
[1]: http://www.methodscount.com/
[2]: https://golang.org/
[3]: https://github.com/dhleong/dexcounter/tree/master/gradle