aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2016-11-23 15:10:25 +0000
committerPaul Duffin <paulduffin@google.com>2016-11-24 14:11:45 +0000
commitaa20b34387ab111206e5f98e0df104a174424a82 (patch)
treee95f81099f039be26cbf8156f70038d9016e48a7
parent2e7552431cce028d5c9eba8e8cd5b2e4709215aa (diff)
downloadjunit-aa20b34387ab111206e5f98e0df104a174424a82.tar.gz
Add junit-host and make junit an alias for it
The junit build target breaks naming conventions. A target built for the host should have a -host suffix. This change is the first step in correcting that before adding any new targets. The next step is to replace all usages of junit target to junit-host, including some in goog/master. The step after that is to remove the junit target itself. Bug: 30188076 Test: make checkbuild Change-Id: Icaa8770a460b06e514ecc8813f6d70c2b9c526d3
-rw-r--r--Android.mk14
1 files changed, 11 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk
index 781b2b2..c42a558 100644
--- a/Android.mk
+++ b/Android.mk
@@ -19,12 +19,20 @@ LOCAL_PATH := $(call my-dir)
# include definition of core-junit-files
include $(LOCAL_PATH)/Common.mk
-# note: ideally this should be junit-host, but leave as is for now to avoid
-# changing all its dependencies
+# note: this is deprecated in favour of junit-host; this will be removed soon.
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_MODULE := junit
LOCAL_MODULE_TAGS := optional
+LOCAL_STATIC_JAVA_LIBRARIES := junit-host
+include $(BUILD_HOST_JAVA_LIBRARY)
+
+# build a junit-host jar
+# ----------------------
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_MODULE := junit-host
+LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_JAVA_LIBRARIES := hamcrest-host
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/Common.mk
include $(BUILD_HOST_JAVA_LIBRARY)