To support protos (and other srcs that generate sources), we need to partition further. Separate out into a separate common function. Bug: 200601772 Test: build/bazel/ci/bp2build.sh Change-Id: I7bf4cd96fd9a9fca4ccb3c96f21a04303201f891