blob: f901c9f588b66fff926064992a7febe597da34db [file] [log] [blame]
Alex Light159799d2018-08-08 07:05:19 -07001#!/bin/bash
2
3# TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
4# end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
5# the way sbox rewrites the command. See b/70221552.
6
7set -e
8
9location_aprotoc=$1
10location_protoc=$2
11location_soong_zip=$3
12genDir=$4
13depfile=$5
14in=$6
15out=$7
16
17mkdir -p ${genDir}/${in} && \
18 ${location_aprotoc} --plugin=${location_protoc} \
19 --dependency_out=${depfile} \
20 --javastream_out=${genDir}/${in} \
21 -Iexternal/protobuf/src \
22 -I . \
23 ${in} && \
24 ${location_soong_zip} -jar -o ${out} -C ${genDir}/${in} -D ${genDir}/${in}