KeepSafe/dexcount-gradle-plugin

Split DexCountTask into package-tree-producing and stdout-printing tasks

benjamin-bader opened this issue · 0 comments

As @CristianGM said in the thread on issue #303, we could make better use of Gradle's task cache:

I always though that this kind of tasks that need to do some heavy work + print should be split in 2 tasks. The first, and cacheable, do the heavy work and output the report. The second and not cacheable do read the report and print, so it's fast and doesn't even need to have up-to-date checks.

We aren't task-cacheable today because most people expect to see console output on each build. If a task is cached, no output. If, however, we split the current task into two, the heaviest lift would be by far the task that counts methods and generates the PackageTree. That could be cacheable and not a soul would complain.

As long as we have the opportunity of a 2.0.0 release, we may as well get this in, too.