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,cts-coverage/src/main/tests) \
40    $(call all-java-files-under,runner/src/main/java)
41LOCAL_JAVA_RESOURCE_DIRS := src/main/tests runner/src/main/java
42LOCAL_STATIC_JAVA_LIBRARIES := \
43    android-support-test
44LOCAL_JAVA_LIBRARIES := \
45        core-oj \
46        core-libart
47LOCAL_NO_STANDARD_LIBRARIES := true
48LOCAL_MODULE := android-icu4j-tests
49include $(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#==========================================================
56include $(CLEAR_VARS)
57
58# Don't include this package in any target
59LOCAL_MODULE_TAGS := optional
60LOCAL_SRC_FILES := $(call all-java-files-under,src/main/java)
61LOCAL_STATIC_JAVA_LIBRARIES := \
62    icu4j-icudata-host-jarjar \
63    icu4j-icutzdata-host-jarjar
64LOCAL_JAVA_RESOURCE_DIRS := resources
65LOCAL_MODULE := android-icu4j-host
66include $(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#==========================================================
77include $(CLEAR_VARS)
78
79# Don't include this package in any target
80LOCAL_MODULE_TAGS := tests
81LOCAL_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)
86LOCAL_JAVA_RESOURCE_DIRS := src/main/tests
87LOCAL_STATIC_JAVA_LIBRARIES := \
88    android-icu4j-host \
89    junit
90LOCAL_MODULE := android-icu4j-tests-host
91include $(BUILD_HOST_JAVA_LIBRARY)
92