From 906da1b5df66d237e8629ea36cd241ed868ec0b0 Mon Sep 17 00:00:00 2001 From: Allen Hair Date: Wed, 20 Jun 2018 11:39:16 -0700 Subject: [PATCH] Distribute XML formatted API files as part of the coverage build. Bug: 110485176 Test: m -j32 droid dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true tests Change-Id: I151afde05de832cab06421ffe0829f07e60aceb8 --- core/main.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/main.mk b/core/main.mk index a2f624ccb..74696df68 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1270,6 +1270,16 @@ else # TARGET_BUILD_APPS ifeq ($(EMMA_INSTRUMENT),true) $(JACOCO_REPORT_CLASSES_ALL) : $(INSTALLED_SYSTEMIMAGE) $(call dist-for-goals, dist_files, $(JACOCO_REPORT_CLASSES_ALL)) + + # Put XML formatted API files in the dist dir. + api_xmls := $(addprefix $(TARGET_OUT_COMMON_INTERMEDIATES)/,api.xml system-api.xml test-api.xml) + $(api_xmls): $(TARGET_OUT_COMMON_INTERMEDIATES)/%api.xml : frameworks/base/api/%current.txt $(APICHECK) + $(hide) echo "Converting API file to XML: $@" + $(hide) mkdir -p $(dir $@) + $(hide) $(APICHECK_COMMAND) -convert2xml $< $@ + + $(call dist-for-goals, dist_files, $(api_xmls)) + api_xmls := endif # Building a full system-- the default is to build droidcore