0

I am developing a future open source Android library with Kotlin, and I'd like to count the methods from my own code as well as from dependencies. Since how Kotlin differs from Java, I assume the tool should take an aar input as a file to get the real methods count, but I only found tools taking apk files as inputs so far.

How can I do it the simplest way?

Thanks for your help!

2

1 Answer 1

2

The dexcount-gradle-plugin works with libraries as well. The resulting @aar file should not differ when using Kotlin instead of Java, since Kotlin just compiles to Java byte code as well. So just use it and you'll get all the information you need for your library.

buildscript {
    dependencies {
        classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.6.4'
    }
}
apply plugin: 'com.getkeepsafe.dexcount'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.