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
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "frameworks_base_packages_SystemUI_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
22}
23
24genrule {
25    name: "statslog-SystemUI-java-gen",
26    tools: ["stats-log-api-gen"],
27    cmd: "$(location stats-log-api-gen) --java $(out) --module sysui --javaPackage com.android.systemui.shared.system --javaClass SysUiStatsLog",
28    out: ["com/android/systemui/shared/system/SysUiStatsLog.java"],
29}
30
31java_library {
32    name: "SystemUI-statsd",
33
34    srcs: [
35        ":statslog-SystemUI-java-gen",
36    ],
37}
38
39android_library {
40    name: "SystemUISharedLib",
41    srcs: [
42        "src/**/*.java",
43        "src/**/*.kt",
44        "src/**/*.aidl",
45        ":wm_shell-aidls",
46        ":wm_shell_util-sources",
47    ],
48    static_libs: [
49        "PluginCoreLib",
50        "SystemUIAnimationLib",
51        "SystemUIPluginLib",
52        "SystemUIUnfoldLib",
53        "androidx.dynamicanimation_dynamicanimation",
54        "androidx.concurrent_concurrent-futures",
55        "androidx.lifecycle_lifecycle-runtime-ktx",
56        "androidx.lifecycle_lifecycle-viewmodel-ktx",
57        "androidx.recyclerview_recyclerview",
58        "kotlinx_coroutines_android",
59        "kotlinx_coroutines",
60        "dagger2",
61        "jsr330",
62    ],
63    resource_dirs: [
64        "res",
65    ],
66    min_sdk_version: "current",
67    plugins: ["dagger2-compiler"],
68    kotlincflags: ["-Xjvm-default=enable"],
69}
70
71java_library {
72    name: "SystemUI-flag-types",
73    srcs: [
74        "src/com/android/systemui/flags/Flag.kt",
75    ],
76    include_srcs: true,
77    static_kotlin_stdlib: false,
78    java_version: "1.8",
79    min_sdk_version: "current",
80}
81
82java_library {
83    name: "SystemUIFlagsLib",
84    srcs: [
85        "src/com/android/systemui/flags/**/*.kt",
86    ],
87    static_kotlin_stdlib: false,
88    libs: [
89        "androidx.concurrent_concurrent-futures",
90    ],
91    static_libs: [
92        "SystemUI-flag-types",
93    ],
94    optimize: {
95        proguard_flags_files: ["proguard_flags.flags"],
96    },
97    java_version: "1.8",
98    min_sdk_version: "current",
99}
100