1# Copyright (C) 2009 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15# 16 17LOCAL_PATH := $(call my-dir) 18 19# include definition of core-junit-files 20include $(LOCAL_PATH)/Common.mk 21 22include $(CLEAR_VARS) 23 24LOCAL_SRC_FILES := $(call all-java-files-under, src) 25 26# note: ideally this should be junit-host, but leave as is for now to avoid 27# changing all its dependencies 28LOCAL_MODULE := junit 29 30LOCAL_MODULE_TAGS := optional 31 32LOCAL_STATIC_JAVA_LIBRARIES := hamcrest-host 33 34include $(BUILD_HOST_JAVA_LIBRARY) 35 36# ---------------------------------- 37# build a core-junit target jar that is built into Android system image 38 39include $(CLEAR_VARS) 40 41# TODO: remove extensions once core-tests is no longer dependent on it 42LOCAL_SRC_FILES := $(call all-java-files-under, src/junit/extensions) 43LOCAL_SRC_FILES += $(core-junit-files) 44 45LOCAL_NO_STANDARD_LIBRARIES := true 46LOCAL_JAVA_LIBRARIES := core 47LOCAL_JAVACFLAGS := $(local_javac_flags) 48LOCAL_MODULE_TAGS := optional 49LOCAL_MODULE := core-junit 50include $(BUILD_JAVA_LIBRARY) 51 52ifeq ($(WITH_HOST_DALVIK),true) 53# ---------------------------------- 54# build a core-junit-hostdex jar that contains exactly the same classes 55# as core-junit. 56 57include $(CLEAR_VARS) 58 59# TODO: remove extensions once apache-harmony/luni/ is no longer dependent 60# on it 61LOCAL_SRC_FILES := $(call all-java-files-under, src/junit/extensions) 62LOCAL_SRC_FILES += $(core-junit-files) 63LOCAL_NO_STANDARD_LIBRARIES := true 64LOCAL_JAVA_LIBRARIES := core-hostdex 65LOCAL_JAVACFLAGS := $(local_javac_flags) 66LOCAL_MODULE_TAGS := optional 67LOCAL_MODULE := core-junit-hostdex 68LOCAL_BUILD_HOST_DEX := true 69include $(BUILD_HOST_JAVA_LIBRARY) 70 71endif 72 73