Automated compilation of .proto files

Started building GRPC service and wanted all .proto files in a common package for both client / server. Is there a way to automatically build the proto files when the package is listed as a dependency