aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyo Hashimoto <hashimoto@google.com>2018-06-21 10:49:41 +0900
committerRyo Hashimoto <hashimoto@google.com>2018-06-21 10:52:41 +0900
commit7435fbe37e14eee2dbd1535197217109b3da61ec (patch)
tree74208c2dad70ede794a3bc1e6bb78bc1d40ed3a5
parentfd75f2cd95d4c37cb9ee3cc1c95a367b34b3da3c (diff)
downloadlibmojo-pie-b4s4-dev.tar.gz
This is essentially a cherry-pick of https://android-review.googlesource.com/c/699550. Bug: 110444246 Test: build Change-Id: I7579f91c760a6b4380861390109a12298da2703d
-rwxr-xr-xsoong/mojom_source_generator.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/soong/mojom_source_generator.sh b/soong/mojom_source_generator.sh
index f1fac9e..a63b8a0 100755
--- a/soong/mojom_source_generator.sh
+++ b/soong/mojom_source_generator.sh
@@ -71,6 +71,10 @@ for arg in "$@"; do
--generators=*)
generators="${arg#'--generators='}"
;;
+ --srcjar=*)
+ srcjar="${arg#'--srcjar='}"
+ srcjar="$(get_abs_path ${srcjar})"
+ ;;
--*)
args=("${args[@]}" "${arg}")
;;
@@ -110,3 +114,7 @@ for file in "${files[@]}"; do
unzip -qo -d "${output_dir}"/src "${output_dir}/${rel_path}".srcjar
fi
done
+
+if [[ -n "${srcjar}" ]] ; then
+ (cd "${output_dir}/src" && find . -name '*.java' -print | zip "${srcjar}" -@)
+fi