Add rule to enable running Jetifier within Make against Java modules

The only case where we expect to actually enable this behavior is for
modules that are just an unpacking of a prebuilt, because those are
the only cases for which we can't conveniently just change the source

Bug: 72552006
Test: ./build/soong/scripts/diff_build_graphs.sh \
      --products=aosp_arm 'build/make:work^' \
      'build/make:work'
Test: cherry-pick the following patch that depends on this one and
      the rest of that patch's topic, and then do `m -j jeffapp`

Change-Id: I62e231900d6d87673ddf19c7fc2686fef2828590
This commit is contained in:
Jeff Gaston
2018-01-31 17:34:07 -05:00
parent 74e5ccb28b
commit d2ba724f7f
5 changed files with 53 additions and 4 deletions

View File

@@ -557,11 +557,17 @@ else
full_classes_jarjar_jar := $(full_classes_processed_jar)
endif
$(eval $(call copy-one-file,$(full_classes_jarjar_jar),$(full_classes_jar)))
#######################################
LOCAL_JETIFIER_INPUT_FILE := $(full_classes_jarjar_jar)
LOCAL_FULL_CLASSES_PRE_JACOCO_JAR := $(full_classes_jar)
include $(BUILD_SYSTEM)/jetifier.mk
#######################################
$(eval $(call copy-one-file,$(LOCAL_JETIFIER_OUTPUT_FILE),$(full_classes_jar)))
#######################################
LOCAL_FULL_CLASSES_PRE_JACOCO_JAR := $(full_classes_jar)
include $(BUILD_SYSTEM)/jacoco.mk
#######################################