Run jetifier against prebuilts directly rather than classes.jar
It turns out that the resource files inside the .aar files may
need rewriting too
Bug: 72552006
Test: Set LOCAL_JETIFIED_ENABLED for a prebuilt and built it
See also one of the patches after this one and its topic
which contains a sample for testing
Change-Id: I89d0b4aa8d5c6ae3abc2344dd05222cf9672d5c0
(cherry picked from commit ed170e72961dab855848bc58527923cbeba551b5)
diff --git a/core/jetifier.mk b/core/jetifier.mk
index 305c9dd..33a4624 100644
--- a/core/jetifier.mk
+++ b/core/jetifier.mk
@@ -20,7 +20,7 @@
ifeq ($(strip $(LOCAL_JETIFIER_ENABLED)),true)
my_jetifier_input_path := $(LOCAL_JETIFIER_INPUT_FILE)
my_files := $(intermediates.COMMON)/jetifier
- my_jetifier_output_path := $(my_files)/classes-jetifier.jar
+ my_jetifier_output_path := $(my_files)/jetified-$(notdir $(my_jetifier_input_path))
$(my_jetifier_output_path) : $(my_jetifier_input_path) $(JETIFIER)
rm -rf $@