From 9007e530aa0351f7135e4b650f2fea191aa47661 Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Sat, 27 Oct 2018 21:46:19 +0000 Subject: [PATCH] Revert^4: Change command-line flags of hiddenapi The `hiddenapi` build tool now reads a dex file from one filename and writes a modified dex file to another. Change the build rule to reflect it. This reverts commit d8c427fbba91137cf6cfa22887d40a306e2cecae. Change-Id: Ic9a4188a65f7a6fb28edae1aeda7422e93800c58 Test: m --- core/definitions.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/definitions.mk b/core/definitions.mk index baa2342f3..b00ab6ff9 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2672,9 +2672,10 @@ $(2): $(1) $(HIDDENAPI) $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) \ $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) @rm -rf $(dir $(2)) @mkdir -p $(dir $(2)) - find $(dir $(1)) -maxdepth 1 -name "classes*.dex" | xargs -I{} cp -f {} $(dir $(2))/; \ - find $(dir $(2)) -maxdepth 1 -name "classes*.dex" | sort | sed 's/^/--dex=/' \ - | xargs $(HIDDENAPI) encode \ + for INPUT_DEX in `find $(dir $(1)) -maxdepth 1 -name "classes*.dex" | sort`; do \ + echo "--input-dex=$$$${INPUT_DEX}"; \ + echo "--output-dex=$(dir $(2))/`basename $$$${INPUT_DEX}`"; \ + done | xargs $(HIDDENAPI) encode \ --light-greylist=$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) \ --dark-greylist=$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST) \ --blacklist=$(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)