google / protobuf-gradle-plugin

Protobuf Plugin for Gradle
Other
1.77k stars 273 forks source link

plugin should support system search path #700

Closed YifeiZhuang closed 1 year ago

YifeiZhuang commented 1 year ago

This doc is not clear

https://github.com/google/protobuf-gradle-plugin/blob/d7c23d9f691e2d6ef537c662d3637c06ac58939d/README.md?plain=1#L179

This configuration generates command --plugin=protoc-gen-grpc=protoc-gen-grpc, and only works when protoc-gen-grpc exists in the current build directory. It does not search the system path.

plugins {
    grpc {

    }
      generateProtoTasks {
        all()*.plugins { grpc {} }
    }
  }

if the entire plugins configuration is omitted, then it generates command without --plugin flag, which searches for system path. Maybe make the above configuration searching for system path is better behavior, because it allows using system path and configuration each plugin separately.

YifeiZhuang commented 1 year ago

related to https://github.com/google/protobuf-gradle-plugin/issues/699