blob: 18f019dc949ba2b578500e8d0faa655206b3e478 [file] [log] [blame]
Winson Chung10a9b4b2019-12-18 10:01:36 -08001// Copyright (C) 2019 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
Bob Badour8a6a2bc2021-02-12 17:07:05 -080015package {
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_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["frameworks_base_license"],
22}
23
Winson Chungb754f522020-08-03 22:17:08 -070024// Begin ProtoLog
25java_library {
26 name: "wm_shell_protolog-groups",
27 srcs: [
28 "src/com/android/wm/shell/protolog/ShellProtoLogGroup.java",
29 ":protolog-common-src",
30 ],
31}
32
33filegroup {
34 name: "wm_shell-sources",
Bill Lin2b3bd572020-09-03 23:22:14 +080035 srcs: [
36 "src/**/*.java",
37 ],
38 path: "src",
39}
40
Winson Chung2b72add2021-02-02 23:27:07 -080041filegroup {
42 name: "wm_shell-aidls",
43 srcs: [
44 "src/**/*.aidl",
45 ],
46 path: "src",
47}
48
Bill Lin2b3bd572020-09-03 23:22:14 +080049// TODO(b/168581922) protologtool do not support kotlin(*.kt)
50filegroup {
51 name: "wm_shell-sources-kt",
52 srcs: [
53 "src/**/*.kt",
54 ],
Winson Chungb754f522020-08-03 22:17:08 -070055 path: "src",
56}
57
58genrule {
59 name: "wm_shell_protolog_src",
60 srcs: [
61 ":wm_shell_protolog-groups",
62 ":wm_shell-sources",
63 ],
64 tools: ["protologtool"],
65 cmd: "$(location protologtool) transform-protolog-calls " +
Quang Luong0c3b94e2021-03-19 16:55:23 +000066 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
67 "--protolog-impl-class com.android.wm.shell.protolog.ShellProtoLogImpl " +
68 "--protolog-cache-class com.android.wm.shell.protolog.ShellProtoLogCache " +
69 "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
70 "--loggroups-jar $(location :wm_shell_protolog-groups) " +
71 "--output-srcjar $(out) " +
72 "$(locations :wm_shell-sources)",
Winson Chungb754f522020-08-03 22:17:08 -070073 out: ["wm_shell_protolog.srcjar"],
74}
75
76genrule {
77 name: "generate-wm_shell_protolog.json",
78 srcs: [
79 ":wm_shell_protolog-groups",
80 ":wm_shell-sources",
81 ],
82 tools: ["protologtool"],
83 cmd: "$(location protologtool) generate-viewer-config " +
Quang Luong0c3b94e2021-03-19 16:55:23 +000084 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
85 "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
86 "--loggroups-jar $(location :wm_shell_protolog-groups) " +
87 "--viewer-conf $(out) " +
88 "$(locations :wm_shell-sources)",
Winson Chungb754f522020-08-03 22:17:08 -070089 out: ["wm_shell_protolog.json"],
90}
Winson Chungb754f522020-08-03 22:17:08 -070091// End ProtoLog
92
Winson Chungeb1aa3d2020-08-25 19:02:29 -070093java_library {
94 name: "WindowManager-Shell-proto",
95
96 srcs: ["proto/*.proto"],
97
98 proto: {
99 type: "nano",
100 },
101}
102
Winson Chung10a9b4b2019-12-18 10:01:36 -0800103android_library {
104 name: "WindowManager-Shell",
105 srcs: [
Winson Chungb754f522020-08-03 22:17:08 -0700106 ":wm_shell_protolog_src",
Bill Lin2b3bd572020-09-03 23:22:14 +0800107 // TODO(b/168581922) protologtool do not support kotlin(*.kt)
108 ":wm_shell-sources-kt",
Winson Chung2b72add2021-02-02 23:27:07 -0800109 ":wm_shell-aidls",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800110 ],
111 resource_dirs: [
112 "res",
113 ],
Winson Chung9169b372021-02-12 00:29:24 -0800114 java_resources: [
Quang Luong0c3b94e2021-03-19 16:55:23 +0000115 ":generate-wm_shell_protolog.json"
Winson Chung9169b372021-02-12 00:29:24 -0800116 ],
Winson Chungb754f522020-08-03 22:17:08 -0700117 static_libs: [
Tony Huangeb01a252020-10-27 11:37:11 +0800118 "androidx.appcompat_appcompat",
119 "androidx.arch.core_core-runtime",
Bill Lin2b3bd572020-09-03 23:22:14 +0800120 "androidx.dynamicanimation_dynamicanimation",
Sunny Goyaldcdee332021-03-30 09:42:19 -0700121 "androidx.recyclerview_recyclerview",
Bill Lin2b3bd572020-09-03 23:22:14 +0800122 "kotlinx-coroutines-android",
123 "kotlinx-coroutines-core",
Tony Huangeb01a252020-10-27 11:37:11 +0800124 "iconloader_base",
Winson Chung94132e12020-11-09 19:42:12 -0800125 "jsr330",
Winson Chungb754f522020-08-03 22:17:08 -0700126 "protolog-lib",
Winson Chungeb1aa3d2020-08-25 19:02:29 -0700127 "WindowManager-Shell-proto",
Sunny Goyaldcdee332021-03-30 09:42:19 -0700128 "jsr330",
Winson Chungb754f522020-08-03 22:17:08 -0700129 ],
Bill Lin2b3bd572020-09-03 23:22:14 +0800130 kotlincflags: ["-Xjvm-default=enable"],
Winson Chung10a9b4b2019-12-18 10:01:36 -0800131 manifest: "AndroidManifest.xml",
Bill Lin2b3bd572020-09-03 23:22:14 +0800132
Quang Luong0c3b94e2021-03-19 16:55:23 +0000133 min_sdk_version: "26",
Dave Mankoff9179b302020-12-02 11:15:27 -0500134}