$ ./gradlew build
とかして
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings
こんなのが返ってきてどれが原因なのか教えてくれなかったけど、
$ ./gradlew build -Dorg.gradle.warning.mode=all
みたいに -Dorg.gradle.warning.mode=all をつけてやれば
> Task :hoge-fuga:generateProto
Using TaskInputs.file() with something that doesn't resolve to a File object has been deprecated and is scheduled to be removed in Gradle 5.0. Use TaskInputs.files() instead.
みたいに教えてくれた。