summaryrefslogtreecommitdiffstats
path: root/JavaLibrary.mk
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2013-08-29 14:24:47 -0700
committerKenny Root <kroot@google.com>2013-08-30 14:55:13 -0700
commit4616c7f802521312349adec76e10f4a5b612223e (patch)
tree2e2ba8d5f950482ddbdbd743f08a9f8ae3718ef9 /JavaLibrary.mk
parent011ed31c4d057d973931fa81a09d8c576a72d82a (diff)
downloadlibcore-4616c7f802521312349adec76e10f4a5b612223e.tar.gz
libcore-4616c7f802521312349adec76e10f4a5b612223e.tar.bz2
libcore-4616c7f802521312349adec76e10f4a5b612223e.zip
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
Diffstat (limited to 'JavaLibrary.mk')
-rw-r--r--JavaLibrary.mk22
1 files changed, 18 insertions, 4 deletions
diff --git a/JavaLibrary.mk b/JavaLibrary.mk
index 5bdfb01de..03fe00b0f 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