Sbt builder fix and refactor

* Fixed the issue with lost deprecation warnings. #1002148
* Refactored and removed useless indirection in the build reporter

The best would be to review the two commits separatetly. The first one fixes the issue, the last one is purely cleanup.

/cc @gkossakowski
You're right, looks wrong. I'll try to dig in git history and find out why the code is like that (I see no need to save total in the first place)