1# Copyright (C) 2017 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
15LOCAL_PATH := $(call my-dir)
16include $(CLEAR_VARS)
17
18# Intermediate target that produces classes-only jar
19
20LOCAL_MODULE := robolectric_android-all-stub
21
22LOCAL_STATIC_JAVA_LIBRARIES := \
23    conscrypt \
24    core-libart \
25    ext \
26    framework \
27    icu4j-icudata-jarjar \
28    icu4j-icutzdata-jarjar \
29    ims-common \
30    android.test.base_static \
31    libphonenumber-platform \
32    okhttp \
33    services \
34    services.accessibility \
35    telephony-common \
36    updatable-media
37
38# include the uncompiled/raw resources in the jar
39# Eventually these raw resources will be removed once the transition to
40# binary/compiled resources is complete.
41LOCAL_JAVA_RESOURCE_FILES := \
42    frameworks/base/core/res/assets \
43    frameworks/base/core/res/res
44
45include $(BUILD_STATIC_JAVA_LIBRARY)
46
47# Copy the tzdata, preserving its path.
48$(LOCAL_INTERMEDIATE_TARGETS): $(call copy-many-files,\
49    system/timezone/output_data/iana/tzdata:$(intermediates.COMMON)/usr/share/zoneinfo/tzdata \
50    system/timezone/output_data/android/tzlookup.xml:$(intermediates.COMMON)/usr/share/zoneinfo/tzlookup.xml)
51$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_EXTRA_JAR_ARGS += \
52    -C "$(intermediates.COMMON)" "usr/share/zoneinfo"
53
54# Copy the build.prop
55$(LOCAL_INTERMEDIATE_TARGETS): $(call copy-many-files,\
56    $(TARGET_OUT)/build.prop:$(intermediates.COMMON)/build.prop)
57$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_EXTRA_JAR_ARGS += \
58    -C "$(intermediates.COMMON)" "build.prop"
59
60########################################
61
62include $(CLEAR_VARS)
63
64# Adds binary framework resources to the produced jar
65robo_stub_module_name := robolectric_android-all-stub
66include $(LOCAL_PATH)/include_framework_res.mk
67
68# Distribute the android-all artifact with SDK artifacts.
69$(call dist-for-goals,sdk win_sdk,\
70    $(robo_full_target):android-all-$(PLATFORM_VERSION)-robolectric-$(FILE_NAME_TAG).jar)
71