Merge "Fix dependencies of protoc with nanopb-c plugin"
diff --git a/core/binary.mk b/core/binary.mk
index 3daecb2..5e35ac7 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -109,9 +109,6 @@
my_ndk_stl_static_lib :=
my_ndk_stl_cppflags :=
my_cpu_variant := $(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)CPU_ABI)
- ifeq (mips32r6,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH_VARIANT))
- my_cpu_variant := mips32r6
- endif
LOCAL_NDK_STL_VARIANT := $(strip $(LOCAL_NDK_STL_VARIANT))
ifeq (,$(LOCAL_NDK_STL_VARIANT))
LOCAL_NDK_STL_VARIANT := system
diff --git a/core/package_internal.mk b/core/package_internal.mk
index 65b65be..6966625 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -191,8 +191,21 @@
else # ! EMMA_INSTRUMENT_STATIC
ifdef LOCAL_SDK_VERSION
ifdef TARGET_BUILD_APPS
+# In unbundled build, merge the coverage library into the apk.
# Jack supports coverage with Jacoco
LOCAL_STATIC_JAVA_LIBRARIES += jacocoagent
+# Exclude jacoco classes from proguard
+LOCAL_PROGUARD_FLAGS += -include $(BUILD_SYSTEM)/proguard.jacoco.flags
+LOCAL_JACK_PROGUARD_FLAGS += -include $(BUILD_SYSTEM)/proguard.jacoco.flags
+else # ! TARGET_BUILD_APPS
+# If build against the SDK in full build, core.jar is not used
+# so coverage classes are not present.
+# Jack needs jacoco on the classpath but we do not want it to be in
+# the final apk. While it is a static library, we add it to the
+# LOCAL_JAVA_LIBRARIES which are only present on the classpath.
+# Note: we have nothing to do for proguard since jacoco will be
+# on the classpath only, thus not modified during the compilation.
+LOCAL_JAVA_LIBRARIES += jacocoagent
endif # TARGET_BUILD_APPS
endif # LOCAL_SDK_VERSION
endif # ! EMMA_INSTRUMENT_STATIC