• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2015 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
19include $(CLEAR_VARS)
20
21LOCAL_MODULE_TAGS := optional
22
23include $(LOCAL_PATH)/version.mk
24
25LOCAL_SRC_FILES := \
26    $(call all-java-files-under, src) \
27    $(call all-proto-files-under, proto)
28
29LOCAL_PACKAGE_NAME := LiveTv
30
31# It is required for com.android.providers.tv.permission.ALL_EPG_DATA
32LOCAL_PRIVILEGED_MODULE := true
33
34LOCAL_SDK_VERSION := system_current
35LOCAL_MIN_SDK_VERSION := 23  # M
36LOCAL_RESOURCE_DIR := \
37    $(LOCAL_PATH)/res \
38    $(LOCAL_PATH)/usbtuner-res \
39    $(LOCAL_PATH)/common/res
40
41ifdef TARGET_BUILD_APPS
42LOCAL_RESOURCE_DIR += \
43    $(TOP)/prebuilts/sdk/current/support/v17/leanback/res \
44    $(TOP)/prebuilts/sdk/current/support/v7/recyclerview/res
45else # !TARGET_BUILD_APPS
46LOCAL_RESOURCE_DIR += \
47    $(TOP)/frameworks/support/v17/leanback/res \
48    $(TOP)/frameworks/support/v7/recyclerview/res
49endif
50
51LOCAL_STATIC_JAVA_LIBRARIES := \
52    android-support-annotations \
53    android-support-v4 \
54    android-support-v7-palette \
55    android-support-v7-recyclerview \
56    android-support-v17-leanback \
57    icu4j-usbtuner \
58    lib-exoplayer \
59    tv-common \
60    legacy-android-test \
61    junit
62
63
64LOCAL_JAVACFLAGS := -Xlint:deprecation -Xlint:unchecked
65
66LOCAL_AAPT_FLAGS := --auto-add-overlay \
67    --extra-packages android.support.v7.recyclerview \
68    --extra-packages android.support.v17.leanback \
69    --extra-packages com.android.tv.common \
70    --version-name "$(version_name_package)" \
71    --version-code $(version_code_package) \
72
73LOCAL_PROGUARD_FLAG_FILES := proguard.flags
74
75
76LOCAL_JNI_SHARED_LIBRARIES := libtunertvinput_jni
77LOCAL_AAPT_FLAGS += --extra-packages com.android.tv.tuner
78
79LOCAL_PROTOC_OPTIMIZE_TYPE := nano
80LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/proto/
81
82include $(BUILD_PACKAGE)
83
84# --------------------------------------------------------------
85# Build a tiny icu4j library out of the classes necessary for the project.
86
87include $(CLEAR_VARS)
88
89LOCAL_MODULE := icu4j-usbtuner
90LOCAL_MODULE_TAGS := optional
91icu4j_path := icu/icu4j
92LOCAL_SRC_FILES := \
93    $(icu4j_path)/main/classes/core/src/com/ibm/icu/text/SCSU.java \
94    $(icu4j_path)/main/classes/core/src/com/ibm/icu/text/UnicodeDecompressor.java
95LOCAL_SDK_VERSION := system_current
96
97include $(BUILD_STATIC_JAVA_LIBRARY)
98
99#############################################################
100# Pre-built dependency jars
101#############################################################
102
103include $(CLEAR_VARS)
104
105LOCAL_MODULE_TAGS := optional
106
107LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
108    lib-exoplayer:libs/exoplayer.jar \
109
110
111include $(BUILD_MULTI_PREBUILT)
112
113
114include $(call all-makefiles-under,$(LOCAL_PATH))
115