merge in nyc-release history after reset to nyc-dev
diff --git a/core/build_id.mk b/core/build_id.mk
index 7e946db..5a012b9 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -18,4 +18,4 @@
 # (like "CRB01").  It must be a single word, and is
 # capitalized by convention.
 
-export BUILD_ID=NRD05
+export BUILD_ID=NYC
diff --git a/core/package_internal.mk b/core/package_internal.mk
index 032dfbb..551f18e 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -241,21 +241,34 @@
 else
 ifdef LOCAL_SDK_VERSION
 ifdef TARGET_BUILD_APPS
-# In unbundled build merge the emma library into the apk.
+# In unbundled build, merge the coverage library into the apk.
 ifdef LOCAL_JACK_ENABLED
 # Jack supports coverage with Jacoco
 ifneq ($(LOCAL_SRC_FILES)$(LOCAL_STATIC_JAVA_LIBRARIES)$(LOCAL_SOURCE_FILES_ALL_GENERATED),)
 # Only add jacocoagent if the package contains some java code
 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
 endif # Contains java code
 else
 LOCAL_STATIC_JAVA_LIBRARIES += emma
 endif # LOCAL_JACK_ENABLED
 else
-# If build against the SDK in full build, core.jar is not used,
-# we have to use prebiult emma.jar to make Proguard happy;
+# If build against the SDK in full build, core.jar is not used
+# so coverage classes are not present.
+ifdef LOCAL_JACK_ENABLED
+# 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
+else
+# We have to use prebuilt emma.jar to make Proguard happy;
 # Otherwise emma classes are included in core.jar.
 LOCAL_PROGUARD_FLAGS += -libraryjars $(EMMA_JAR)
+endif # LOCAL_JACK_ENABLED
 endif # full build
 endif # LOCAL_SDK_VERSION
 endif # EMMA_INSTRUMENT_STATIC