The ProtoData Gradle plugin takes files generated by protoc as its input and puts the output files into a distinct directory. In order to avoid duplicates on the compilation, the plugin filters the compiler's input so that it does not contain ProtoData's inputs, only ProtoData's output. See io.spine.protodata.gradle.plugin#configureCompileTasks for more info.
However, this sometimes does not work in for the test source set.