Move classes.jar generation right below JarJar phase.
By doing this, we don't need run desugar/Jacoco/proguard twice for
static java libraries(one for their self build, another for downstream
dependents).
Test: m clean && m java
Bug: b/65455145
Change-Id: I87aee34940937dbde33a977f55d1faf2c8054561
diff --git a/core/java_library.mk b/core/java_library.mk
index db4ccb5..f766c01 100644
--- a/core/java_library.mk
+++ b/core/java_library.mk
@@ -67,12 +67,12 @@
ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true)
# There are some dependencies outside the build system that assume classes.jar
# is available as javalib.jar so copy it there too.
-$(eval $(call copy-one-file,$(full_classes_jar),$(common_javalib.jar)))
+$(eval $(call copy-one-file,$(full_classes_proguard_jar),$(common_javalib.jar)))
ifdef LOCAL_JACK_ENABLED
$(eval $(call copy-one-file,$(full_classes_jack),$(LOCAL_BUILT_MODULE)))
else
-$(eval $(call copy-one-file,$(full_classes_jar),$(LOCAL_BUILT_MODULE)))
+$(eval $(call copy-one-file,$(full_classes_proguard_jar),$(LOCAL_BUILT_MODULE)))
endif
else # !LOCAL_IS_STATIC_JAVA_LIBRARY