Don't use path to find protoc-gen-javastream
Previous attempts to use a full path in the --plugin argument
failed, but that was because the --plugin argument had the wrong
name (protoc-gen-java-stream instead of protoc-gen-javastream)
and was being completely ignored. Passing a full path where
the last element of the path is protoc-gen-javastream works fine.
Fixes issues where the command line is expanded with $PATH in
it 58 times which could hit command length limits if $PATH was
even a little bit larger than the default.
Test: m framework
Change-Id: Icd336f522fb8770d9058d18d8a04d24a96405615
diff --git a/Android.bp b/Android.bp
index 86e5747..c03530e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -603,11 +603,9 @@
"soong_zip",
],
- // Append protoc-gen-javastream tool's PATH otherwise aprotoc can't find the plugin tool
- cmd: "export PATH=$$PATH:$$(dirname $(location protoc-gen-javastream)) " +
- "&& mkdir -p $(genDir)/$(in) " +
+ cmd: "mkdir -p $(genDir)/$(in) " +
"&& $(location aprotoc) " +
- " --plugin=protoc-gen-java-stream=protoc-gen-javastream " +
+ " --plugin=$(location protoc-gen-javastream) " +
" --dependency_out=$(depfile) " +
" --javastream_out=$(genDir)/$(in) " +
" -Iexternal/protobuf/src " +