From 4616c7f802521312349adec76e10f4a5b612223e Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Thu, 29 Aug 2013 14:24:47 -0700 Subject: Move support library to a separate static library frameworks/base/core/tests/coretests uses the libcore/support/* classes for SSL-based tests. Instead of including core-tests itself, we need to split out the support classes to its own library to keep frameworks tests below the dex method limit. (cherry picked from commit b397b19a825d69e9122f1241849db726abae5413) Bug: 10092469 Change-Id: Ib9b1dd60cb778dba79afcbe3001749d82afa99d2 --- JavaLibrary.mk | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'JavaLibrary.mk') diff --git a/JavaLibrary.mk b/JavaLibrary.mk index 5bdfb01..03fe00b 100644 --- a/JavaLibrary.mk +++ b/JavaLibrary.mk @@ -50,8 +50,7 @@ $(shell cd $(LOCAL_PATH) && ls -d */src/$(1)/{java,resources} 2> /dev/null) endef # The Java files and their associated resources. -common_core_src_files := $(call all-main-java-files-under,dalvik dex dom json luni support xml) - +common_core_src_files := $(call all-main-java-files-under,dalvik dex dom json luni xml) core_resource_dirs := $(call all-core-resource-dirs,main) test_resource_dirs := $(call all-core-resource-dirs,test) @@ -126,11 +125,11 @@ include $(BUILD_JAVA_LIBRARY) ifeq ($(LIBCORE_SKIP_TESTS),) # Make the core-tests library. include $(CLEAR_VARS) -LOCAL_SRC_FILES := $(call all-test-java-files-under,crypto dalvik dom harmony-tests json luni support xml) +LOCAL_SRC_FILES := $(call all-test-java-files-under,crypto dalvik dom harmony-tests json luni xml) LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) LOCAL_NO_STANDARD_LIBRARIES := true LOCAL_JAVA_LIBRARIES := bouncycastle core conscrypt-nojarjar core-junit okhttp -LOCAL_STATIC_JAVA_LIBRARIES := sqlite-jdbc mockwebserver nist-pkix-tests okhttp-tests +LOCAL_STATIC_JAVA_LIBRARIES := core-tests-support sqlite-jdbc mockwebserver nist-pkix-tests okhttp-tests LOCAL_JAVACFLAGS := $(local_javac_flags) LOCAL_JARJAR_RULES := $(LOCAL_PATH)/crypto/jarjar-rules.txt LOCAL_MODULE := core-tests @@ -138,6 +137,21 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk include $(BUILD_STATIC_JAVA_LIBRARY) endif +ifeq ($(LIBCORE_SKIP_TESTS),) +# Make the core-tests-support library. +include $(CLEAR_VARS) +LOCAL_SRC_FILES := $(call all-test-java-files-under,support) +LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) +LOCAL_NO_STANDARD_LIBRARIES := true +LOCAL_JAVA_LIBRARIES := bouncycastle core core-junit +LOCAL_STATIC_JAVA_LIBRARIES := mockwebserver +LOCAL_JAVACFLAGS := $(local_javac_flags) +LOCAL_JARJAR_RULES := $(LOCAL_PATH)/crypto/jarjar-rules.txt +LOCAL_MODULE := core-tests-support +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk +include $(BUILD_STATIC_JAVA_LIBRARY) +endif + # This one's tricky. One of our tests needs to have a # resource with a "#" in its name, but Perforce doesn't # allow us to submit such a file. So we create it here -- cgit v1.1