blob: 0752661b3a68c93364b8f5b533800dd2d92f1eab [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001#
2# Copyright (C) 2008 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17LOCAL_PATH:= $(call my-dir)
18
Paul Duffinf7475222017-05-19 09:05:54 +010019# Build the android.test.runner library
20# =====================================
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080021include $(CLEAR_VARS)
22
Brett Chabote70f61b2010-02-19 10:49:27 -080023LOCAL_SRC_FILES := $(call all-java-files-under, src)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080024
Paul Duffin8aeb59e2017-01-10 12:08:23 +000025LOCAL_JAVA_LIBRARIES := core-oj core-libart framework legacy-test
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080026
27LOCAL_MODULE:= android.test.runner
28
29include $(BUILD_JAVA_LIBRARY)
Brett Chabote70f61b2010-02-19 10:49:27 -080030
Paul Duffinf7475222017-05-19 09:05:54 +010031# Build the android.test.mock library
32# ===================================
33include $(CLEAR_VARS)
34
35LOCAL_SRC_FILES := $(call all-java-files-under, src/android/test/mock)
36
37LOCAL_JAVA_LIBRARIES := core-oj core-libart framework
38
39LOCAL_MODULE:= android.test.mock
40
41include $(BUILD_JAVA_LIBRARY)
42
43# Generate the stub source files for android.test.mock.sdk
44# ========================================================
45include $(CLEAR_VARS)
46LOCAL_SRC_FILES := $(call all-java-files-under, src/android/test/mock)
47
48LOCAL_JAVA_LIBRARIES := core-oj core-libart framework
49LOCAL_MODULE_CLASS := JAVA_LIBRARIES
50LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/src/android/test/mock
51
52LOCAL_DROIDDOC_OPTIONS:= \
53 -stubpackages android.test.mock \
54 -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android.test.mock.sdk_intermediates/src \
55 -nodocs
56
57LOCAL_UNINSTALLABLE_MODULE := true
58LOCAL_MODULE := android-test-mock-stubs-gen
59
60include $(BUILD_DROIDDOC)
61
62# Remember the target that will trigger the code generation.
63android_test_mock_gen_stamp := $(full_target)
64
65# Build the android.test.mock.sdk library
66# =======================================
67include $(CLEAR_VARS)
68
69LOCAL_MODULE := android.test.mock.sdk
70
71LOCAL_SOURCE_FILES_ALL_GENERATED := true
72
73include $(BUILD_STATIC_JAVA_LIBRARY)
74
75# Make sure to run droiddoc first to generate the stub source files.
76$(full_classes_compiled_jar) : $(android_test_mock_gen_stamp)
77$(full_classes_jack) : $(android_test_mock_gen_stamp)
78
79# Archive a copy of the classes.jar in SDK build.
80$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.mock.jar)
81
Brett Chabote70f61b2010-02-19 10:49:27 -080082# additionally, build unit tests in a separate .apk
83include $(call all-makefiles-under,$(LOCAL_PATH))