1 # 2 # Copyright (C) 2016 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 19 #========================================================== 20 # build repackaged ICU for target 21 # 22 # This is done in the libcore/JavaLibraries.mk file as there are circular 23 # dependencies between ICU and libcore 24 #========================================================== 25 26 #========================================================== 27 # build repackaged ICU tests for target 28 # 29 # Builds against core-libart and core-oj so that it can access all the 30 # repackaged android.icu classes and methods and not just the ones available 31 # through the Android API. 32 #========================================================== 33 include $(CLEAR_VARS) 34 35 # Don't include this package in any target 36 LOCAL_MODULE_TAGS := tests 37 LOCAL_SRC_FILES := \ 38 $(call all-java-files-under,src/main/tests) \ 39 $(call all-java-files-under,cts-coverage/src/main/tests) \ 40 $(call all-java-files-under,runner/src/main/java) 41 LOCAL_JAVA_RESOURCE_DIRS := src/main/tests runner/src/main/java 42 LOCAL_STATIC_JAVA_LIBRARIES := \ 43 android-support-test 44 LOCAL_JAVA_LIBRARIES := \ 45 core-oj \ 46 core-libart 47 LOCAL_NO_STANDARD_LIBRARIES := true 48 LOCAL_MODULE := android-icu4j-tests 49 include $(BUILD_STATIC_JAVA_LIBRARY) 50 51 #========================================================== 52 # build repackaged ICU for host for testing purposes 53 # 54 # Uses the repackaged versions of the data jars 55 #========================================================== 56 include $(CLEAR_VARS) 57 58 # Don't include this package in any target 59 LOCAL_MODULE_TAGS := optional 60 LOCAL_SRC_FILES := $(call all-java-files-under,src/main/java) 61 LOCAL_STATIC_JAVA_LIBRARIES := \ 62 icu4j-icudata-host-jarjar \ 63 icu4j-icutzdata-host-jarjar 64 LOCAL_JAVA_RESOURCE_DIRS := resources 65 LOCAL_MODULE := android-icu4j-host 66 include $(BUILD_HOST_JAVA_LIBRARY) 67 68 #========================================================== 69 # build repackaged ICU tests for host for testing purposes 70 # 71 # Run the tests using junit with the following command: 72 # java -cp ${ANDROID_BUILD_TOP}/out/host/linux-x86/framework/android-icu4j-tests-host.jar org.junit.runner.JUnitCore android.icu.dev.test.TestAll 73 # 74 # Run the tests using the ICU4J test framework with the following command: 75 # java -cp ${ANDROID_BUILD_TOP}/out/host/linux-x86/framework/android-icu4j-tests-host.jar android.icu.dev.test.TestAll 76 #========================================================== 77 include $(CLEAR_VARS) 78 79 # Don't include this package in any target 80 LOCAL_MODULE_TAGS := tests 81 LOCAL_SRC_FILES := \ 82 $(call all-java-files-under,src/main/tests) \ 83 $(call all-java-files-under,runner/src/main/java) \ 84 $(call all-java-files-under,cts-coverage/src/main/tests) \ 85 $(call all-java-files-under,runner/src/host/java) 86 LOCAL_JAVA_RESOURCE_DIRS := src/main/tests 87 LOCAL_STATIC_JAVA_LIBRARIES := \ 88 android-icu4j-host \ 89 junit 90 LOCAL_MODULE := android-icu4j-tests-host 91 include $(BUILD_HOST_JAVA_LIBRARY) 92