Add --stacktrace to gradle build command.

Reviewed at https://reviews.apache.org/r/23776/