Android.mk revision 24c41072583e508dd0cd190785dabd07580e58a3
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
52# ----------------------------------
53# build a core-junit-hostdex jar that contains exactly the same classes
54# as core-junit.
55
56include $(CLEAR_VARS)
57
58# TODO: remove extensions once apache-harmony/luni/ is no longer dependent
59# on it
60LOCAL_SRC_FILES := $(call all-java-files-under, src/junit/extensions)
61LOCAL_SRC_FILES += $(core-junit-files)
62LOCAL_NO_STANDARD_LIBRARIES := true
63LOCAL_JAVA_LIBRARIES := core-hostdex
64LOCAL_JAVACFLAGS := $(local_javac_flags)
65LOCAL_MODULE_TAGS := optional
66LOCAL_MODULE := core-junit-hostdex
67LOCAL_BUILD_HOST_DEX := true
68include $(BUILD_HOST_JAVA_LIBRARY)
69
70