1 # Copyright (C) 2016 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 17 LOCAL_PATH := $(call my-dir) 18 19 # build for the host JVM 20 #----------------------- 21 include $(CLEAR_VARS) 22 LOCAL_SRC_FILES := $(call all-java-files-under, src/main/java) 23 LOCAL_MODULE := junit-params-host 24 LOCAL_NO_STANDARD_LIBRARIES := true 25 LOCAL_MODULE_TAGS := optional 26 LOCAL_STATIC_JAVA_LIBRARIES := \ 27 junit-host 28 include $(BUILD_HOST_JAVA_LIBRARY) 29 30 # build for the host dalvik 31 # ------------------------- 32 include $(CLEAR_VARS) 33 LOCAL_SRC_FILES := $(call all-java-files-under, src/main/java) 34 LOCAL_MODULE := junit-params-hostdex 35 LOCAL_NO_STANDARD_LIBRARIES := true 36 LOCAL_MODULE_TAGS := optional 37 LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex 38 LOCAL_STATIC_JAVA_LIBRARIES := \ 39 junit-hostdex 40 include $(BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY) 41 42 #------------------------------- 43 # build a target jar 44 45 include $(CLEAR_VARS) 46 47 LOCAL_SRC_FILES := $(call all-java-files-under, src/main/java) 48 LOCAL_MODULE := junit-params 49 LOCAL_NO_STANDARD_LIBRARIES := true 50 LOCAL_MODULE_TAGS := optional 51 LOCAL_JAVA_LIBRARIES := core-oj core-libart 52 LOCAL_STATIC_JAVA_LIBRARIES := \ 53 junit 54 include $(BUILD_STATIC_JAVA_LIBRARY) 55 56 #------------------------------- 57 # build a host test jar 58 # 59 60 include $(CLEAR_VARS) 61 62 LOCAL_SRC_FILES := $(call all-java-files-under, src/test/java) 63 LOCAL_JAVA_RESOURCE_DIRS := src/test/resources 64 LOCAL_MODULE := junit-params-test-host 65 LOCAL_NO_STANDARD_LIBRARIES := true 66 LOCAL_MODULE_TAGS := optional 67 LOCAL_STATIC_JAVA_LIBRARIES := \ 68 junit-params-host \ 69 junit-params-assertj-core-host 70 include $(BUILD_HOST_JAVA_LIBRARY) 71 72 #------------------------------- 73 # build a target test jar 74 # 75 # Run the test jar as follows: 76 # vogar --classpath \ 77 ${ANDROID_PRODUCT_OUT}/obj/JAVA_LIBRARIES/junit-params-test_intermediates/classes.jack \ 78 junitparams 79 80 include $(CLEAR_VARS) 81 82 LOCAL_SRC_FILES := $(call all-java-files-under, src/test/java) 83 LOCAL_JAVA_RESOURCE_DIRS := src/test/resources 84 LOCAL_MODULE := junit-params-test 85 LOCAL_NO_STANDARD_LIBRARIES := true 86 LOCAL_MODULE_TAGS := optional 87 LOCAL_JAVA_LIBRARIES := core-oj core-libart junit 88 LOCAL_STATIC_JAVA_LIBRARIES := \ 89 junit-params \ 90 junit-params-assertj-core 91 include $(BUILD_STATIC_JAVA_LIBRARY) 92 93 #------------------------------- 94 # prebuilt dependencies 95 96 include $(CLEAR_VARS) 97 98 LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \ 99 junit-params-assertj-core:lib/assertj-core-1.7.1.jar 100 101 include $(BUILD_MULTI_PREBUILT) 102 103 #------------------------------- 104 # prebuilt dependencies 105 106 include $(CLEAR_VARS) 107 108 LOCAL_IS_HOST_MODULE := true 109 LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \ 110 junit-params-assertj-core-host:lib/assertj-core-1.7.1.jar 111 112 include $(BUILD_MULTI_PREBUILT) 113