Open bootstraponline opened 7 years ago
There isn't currently no better way. The path to the downloaded protoc isn't meant to be exposed. Why do you need it?
The googleapis/toolkit
relies on setting an environment variable PROTOC_COMPILER
to the path of the protoc executable. Previously project.protobuf.tools.protoc.path
worked, however when I updated the plugin the result is always null.
Is this the proper reference?
Neither project.protobuf.tools.protoc.path
nor project.configurations.protobufToolsLocator_protoc.resolve().getAt(0)
are good ideas.
If a local protoc was set via project.protobuf.tools.protoc.path
, project.configurations.protobufToolsLocator_protoc.resolve().getAt(0)
wouldn't work.
We may be able to provide a public accessor of the protoc, but we may have to tweak the timing of protoc downloads, thus it's not a trivial change, and I currently don't have time to do it.
Is this the proper reference?
Nope, it's this
project.protobuf.tools.protoc.path
which works on an older version of the protobuf-gradle-plugin broke upon updating. I've switched to project.configurations.protobufToolsLocator_protoc.resolve().getAt(0)
. We'll never use a local protoc.
We may be able to provide a public accessor of the protoc, but we may have to tweak the timing of protoc downloads, thus it's not a trivial change, and I currently don't have time to do it.
That would be nice. I don't think there's any rush as we have a work around that's good enough.
project.protobuf.tools.protoc.path
is always null. I have to explicitly resolve the configuration:is there a better way?