Added gradle protobuf compiler tasks

Taken from the legacy branch and updated for the new directory structure