blob: 1b5dc8bdbcaab1d40c0a94d2bc95283b1eff57ab [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
41// TODO(b/168581922) protologtool do not support kotlin(*.kt)
42filegroup {
43 name: "wm_shell-sources-kt",
44 srcs: [
45 "src/**/*.kt",
46 ],
Winson Chungb754f522020-08-03 22:17:08 -070047 path: "src",
48}
49
50genrule {
51 name: "wm_shell_protolog_src",
52 srcs: [
53 ":wm_shell_protolog-groups",
54 ":wm_shell-sources",
55 ],
56 tools: ["protologtool"],
57 cmd: "$(location protologtool) transform-protolog-calls " +
58 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
59 "--protolog-impl-class com.android.wm.shell.protolog.ShellProtoLogImpl " +
60 "--protolog-cache-class com.android.wm.shell.protolog.ShellProtoLogCache " +
61 "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
62 "--loggroups-jar $(location :wm_shell_protolog-groups) " +
63 "--output-srcjar $(out) " +
64 "$(locations :wm_shell-sources)",
65 out: ["wm_shell_protolog.srcjar"],
66}
67
68genrule {
69 name: "generate-wm_shell_protolog.json",
70 srcs: [
71 ":wm_shell_protolog-groups",
72 ":wm_shell-sources",
73 ],
74 tools: ["protologtool"],
75 cmd: "$(location protologtool) generate-viewer-config " +
76 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
77 "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
78 "--loggroups-jar $(location :wm_shell_protolog-groups) " +
79 "--viewer-conf $(out) " +
80 "$(locations :wm_shell-sources)",
81 out: ["wm_shell_protolog.json"],
82}
Winson Chungb754f522020-08-03 22:17:08 -070083// End ProtoLog
84
Winson Chungeb1aa3d2020-08-25 19:02:29 -070085java_library {
86 name: "WindowManager-Shell-proto",
87
88 srcs: ["proto/*.proto"],
89
90 proto: {
91 type: "nano",
92 },
93}
94
Winson Chung10a9b4b2019-12-18 10:01:36 -080095android_library {
96 name: "WindowManager-Shell",
97 srcs: [
Winson Chungb754f522020-08-03 22:17:08 -070098 ":wm_shell_protolog_src",
Bill Lin2b3bd572020-09-03 23:22:14 +080099 // TODO(b/168581922) protologtool do not support kotlin(*.kt)
100 ":wm_shell-sources-kt",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800101 "src/**/I*.aidl",
102 ],
103 resource_dirs: [
104 "res",
105 ],
Winson Chung9169b372021-02-12 00:29:24 -0800106 java_resources: [
107 ":generate-wm_shell_protolog.json"
108 ],
Winson Chungb754f522020-08-03 22:17:08 -0700109 static_libs: [
Tony Huangeb01a252020-10-27 11:37:11 +0800110 "androidx.appcompat_appcompat",
111 "androidx.arch.core_core-runtime",
Bill Lin2b3bd572020-09-03 23:22:14 +0800112 "androidx.dynamicanimation_dynamicanimation",
113 "kotlinx-coroutines-android",
114 "kotlinx-coroutines-core",
Tony Huangeb01a252020-10-27 11:37:11 +0800115 "iconloader_base",
Winson Chung94132e12020-11-09 19:42:12 -0800116 "jsr330",
Winson Chungb754f522020-08-03 22:17:08 -0700117 "protolog-lib",
Tony Huangeb01a252020-10-27 11:37:11 +0800118 "SettingsLib",
Winson Chungeb1aa3d2020-08-25 19:02:29 -0700119 "WindowManager-Shell-proto",
Dave Mankoff9179b302020-12-02 11:15:27 -0500120 "jsr330"
Winson Chungb754f522020-08-03 22:17:08 -0700121 ],
Bill Lin2b3bd572020-09-03 23:22:14 +0800122 kotlincflags: ["-Xjvm-default=enable"],
Winson Chung10a9b4b2019-12-18 10:01:36 -0800123 manifest: "AndroidManifest.xml",
Bill Lin2b3bd572020-09-03 23:22:14 +0800124
125 min_sdk_version: "26",
Dave Mankoff9179b302020-12-02 11:15:27 -0500126}