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 17LOCAL_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#========================================================== 33include $(CLEAR_VARS) 34 35# Don't include this package in any target 36LOCAL_MODULE_TAGS := tests 37LOCAL_SRC_FILES := \ 38 $(call all-java-files-under,src/main/tests) \ 39 $(call all-java-files-under,testing/src) 40LOCAL_JAVA_RESOURCE_DIRS := src/main/tests 41LOCAL_STATIC_JAVA_LIBRARIES := \ 42 android-support-test \ 43 junit \ 44 junit-params 45LOCAL_JAVA_LIBRARIES := \ 46 core-oj \ 47 core-libart 48LOCAL_NO_STANDARD_LIBRARIES := true 49LOCAL_PATCH_MODULE := java.base 50LOCAL_MODULE := android-icu4j-tests 51include $(BUILD_STATIC_JAVA_LIBRARY) 52 53#========================================================== 54# build repackaged ICU for host for testing purposes 55# 56# Uses the repackaged versions of the data jars 57#========================================================== 58include $(CLEAR_VARS) 59 60# Don't include this package in any target 61LOCAL_MODULE_TAGS := optional 62LOCAL_SRC_FILES := \ 63 $(call all-java-files-under,src/main/java) \ 64 $(call all-java-files-under,testing/src) 65LOCAL_STATIC_JAVA_LIBRARIES := \ 66 icu4j-icudata-host-jarjar \ 67 icu4j-icutzdata-host-jarjar 68LOCAL_JAVA_RESOURCE_DIRS := resources 69LOCAL_MODULE := android-icu4j-host 70include $(BUILD_HOST_JAVA_LIBRARY) 71 72#========================================================== 73# build repackaged ICU tests for host for testing purposes 74# 75# Run the tests using junit with the following command: 76# java -cp ${ANDROID_BUILD_TOP}/out/host/linux-x86/framework/android-icu4j-tests-host.jar org.junit.runner.JUnitCore android.icu.dev.test.TestAll 77# 78# Run the tests using the ICU4J test framework with the following command: 79# java -cp ${ANDROID_BUILD_TOP}/out/host/linux-x86/framework/android-icu4j-tests-host.jar android.icu.dev.test.TestAll 80#========================================================== 81include $(CLEAR_VARS) 82 83# Don't include this package in any target 84LOCAL_MODULE_TAGS := tests 85LOCAL_SRC_FILES := \ 86 $(call all-java-files-under,src/main/tests) \ 87 $(call all-java-files-under,testing/src) 88LOCAL_JAVA_RESOURCE_DIRS := src/main/tests 89LOCAL_STATIC_JAVA_LIBRARIES := \ 90 android-icu4j-host \ 91 junit-host \ 92 junit-params-host 93 94LOCAL_MODULE := android-icu4j-tests-host 95include $(BUILD_HOST_JAVA_LIBRARY) 96