The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | # |
| 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 | |
| 17 | LOCAL_PATH:= $(call my-dir) |
| 18 | |
Paul Duffin | 4823935 | 2017-05-19 09:05:54 +0100 | [diff] [blame] | 19 | # Build the android.test.runner library |
| 20 | # ===================================== |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 21 | include $(CLEAR_VARS) |
| 22 | |
Brett Chabot | e70f61b | 2010-02-19 10:49:27 -0800 | [diff] [blame] | 23 | LOCAL_SRC_FILES := $(call all-java-files-under, src) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 24 | |
Paul Duffin | ccb0445 | 2017-01-10 12:08:23 +0000 | [diff] [blame] | 25 | LOCAL_JAVA_LIBRARIES := core-oj core-libart framework legacy-test |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 26 | |
| 27 | LOCAL_MODULE:= android.test.runner |
| 28 | |
| 29 | include $(BUILD_JAVA_LIBRARY) |
Brett Chabot | e70f61b | 2010-02-19 10:49:27 -0800 | [diff] [blame] | 30 | |
Paul Duffin | 4823935 | 2017-05-19 09:05:54 +0100 | [diff] [blame] | 31 | # Build the android.test.mock library |
| 32 | # =================================== |
| 33 | include $(CLEAR_VARS) |
| 34 | |
| 35 | LOCAL_SRC_FILES := $(call all-java-files-under, src/android/test/mock) |
| 36 | |
| 37 | LOCAL_JAVA_LIBRARIES := core-oj core-libart framework |
| 38 | |
| 39 | LOCAL_MODULE:= android.test.mock |
| 40 | |
| 41 | include $(BUILD_JAVA_LIBRARY) |
| 42 | |
| 43 | # Generate the stub source files for android.test.mock.sdk |
| 44 | # ======================================================== |
| 45 | include $(CLEAR_VARS) |
| 46 | LOCAL_SRC_FILES := $(call all-java-files-under, src/android/test/mock) |
| 47 | |
| 48 | LOCAL_JAVA_LIBRARIES := core-oj core-libart framework |
| 49 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 50 | LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/src/android/test/mock |
| 51 | |
| 52 | LOCAL_DROIDDOC_OPTIONS:= \ |
| 53 | -stubpackages android.test.mock \ |
| 54 | -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android.test.mock.sdk_intermediates/src \ |
| 55 | -nodocs |
| 56 | |
| 57 | LOCAL_UNINSTALLABLE_MODULE := true |
| 58 | LOCAL_MODULE := android-test-mock-stubs-gen |
| 59 | |
| 60 | include $(BUILD_DROIDDOC) |
| 61 | |
| 62 | # Remember the target that will trigger the code generation. |
| 63 | android_test_mock_gen_stamp := $(full_target) |
| 64 | |
| 65 | # Build the android.test.mock.sdk library |
| 66 | # ======================================= |
| 67 | include $(CLEAR_VARS) |
| 68 | |
| 69 | LOCAL_MODULE := android.test.mock.sdk |
| 70 | |
| 71 | LOCAL_SOURCE_FILES_ALL_GENERATED := true |
| 72 | |
Paul Duffin | 4823935 | 2017-05-19 09:05:54 +0100 | [diff] [blame] | 73 | # Make sure to run droiddoc first to generate the stub source files. |
Colin Cross | 5781a25 | 2017-09-05 22:59:27 -0700 | [diff] [blame] | 74 | LOCAL_ADDITIONAL_DEPENDENCIES := $(android_test_mock_gen_stamp) |
| 75 | |
| 76 | include $(BUILD_STATIC_JAVA_LIBRARY) |
Paul Duffin | 4823935 | 2017-05-19 09:05:54 +0100 | [diff] [blame] | 77 | |
| 78 | # Archive a copy of the classes.jar in SDK build. |
| 79 | $(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.mock.jar) |
| 80 | |
Brett Chabot | e70f61b | 2010-02-19 10:49:27 -0800 | [diff] [blame] | 81 | # additionally, build unit tests in a separate .apk |
| 82 | include $(call all-makefiles-under,$(LOCAL_PATH)) |