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
17package {
18    default_applicable_licenses: ["packages_apps_TV_license"],
19}
20
21// See: http://go/android-license-faq
22license {
23    name: "packages_apps_TV_license",
24    package_name: "Android Live TV App",
25    visibility: [":__subpackages__"],
26    license_kinds: [
27        "SPDX-license-identifier-Apache-2.0",
28        "SPDX-license-identifier-BSD",
29        "SPDX-license-identifier-MIT",
30    ],
31    license_text: ["res/raw/third_party_licenses"],
32}
33
34version_name = "1.24-asop"
35version_code = "417000452"
36
37java_defaults {
38    name: "LiveTv_defaults",
39    srcs: ["src/**/*.java"],
40
41    manifest: "AndroidManifest_common.xml",
42
43    // TODO(b/122608868) turn proguard back on
44    optimize: {
45        enabled: false,
46    },
47
48    // It is required for com.android.providers.tv.permission.ALL_EPG_DATA
49    privileged: true,
50    product_specific: true,
51
52    sdk_version: "system_current",
53    min_sdk_version: "23", // M
54
55    resource_dirs: [
56        "res",
57        "material_res",
58
59    ],
60
61    required: ["com.android.tv.xml"],
62
63    libs: ["tv-guava-android-jar"],
64
65    static_libs: [
66        "androidx-constraintlayout_constraintlayout",
67        "android-support-annotations",
68        "android-support-compat",
69        "android-support-v7-recyclerview",
70        "androidx.legacy_legacy-support-core-ui",
71        "androidx.leanback_leanback",
72        "androidx.leanback_leanback-preference",
73        "androidx.palette_palette",
74        "androidx.preference_preference",
75        "androidx.tvprovider_tvprovider",
76        "jsr330",
77        "live-channels-partner-support",
78        "live-tv-tuner-proto",
79        "live-tv-tuner",
80        "tv-auto-value-jar",
81        "tv-auto-factory-jar",
82        "tv-common",
83        "tv-error-prone-annotations-jar",
84        "tv-ratings-resources",
85        "tv-javax-annotations-jar",
86        "tv-lib-dagger",
87        "tv-lib-exoplayer",
88        "tv-lib-exoplayer-v2-core",
89        "tv-lib-dagger-android",
90    ],
91
92    plugins: [
93        "tv-auto-value",
94        "tv-auto-factory",
95        "tv-lib-dagger-android-processor",
96        "tv-lib-dagger-compiler",
97    ],
98
99    javacflags: [
100        "-Xlint:deprecation",
101        "-Xlint:unchecked",
102    ],
103
104    aaptflags: [
105        "--version-name",
106        version_name,
107
108        "--version-code",
109        version_code,
110
111        "--extra-packages",
112        "com.android.tv.tuner",
113
114        "--extra-packages",
115        "com.android.tv.common",
116    ],
117}
118
119android_app {
120    name: "LiveTv",
121    defaults: ["LiveTv_defaults"],
122    additional_manifests: ["AndroidManifest_all_inputs.xml"],
123    lint: {
124        baseline_filename: "lint-baseline.xml",
125    },
126}
127
128android_app {
129    name: "LiveTvNonPassthrough",
130    defaults: ["LiveTv_defaults"],
131    additional_manifests: ["AndroidManifest_non_passthrough.xml"],
132    lint: {
133        baseline_filename: "lint-baseline.xml",
134    },
135}
136
137prebuilt_etc {
138    name: "com.android.tv.xml",
139    sub_dir: "permissions",
140    src: "com.android.tv.xml",
141    product_specific: true,
142}
143