| // Copyright (C) 2019 The Android Open Source Project | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, | |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| // See the License for the specific language governing permissions and | |
| // limitations under the License. | |
| package { | |
| // See: http://go/android-license-faq | |
| // A large-scale-change added 'default_applicable_licenses' to import | |
| // all of the 'license_kinds' from "frameworks_base_license" | |
| // to get the below license kinds: | |
| // SPDX-license-identifier-Apache-2.0 | |
| default_applicable_licenses: ["frameworks_base_license"], | |
| default_team: "trendy_team_multitasking_windowing", | |
| } | |
| // Begin ProtoLog | |
| filegroup { | |
| name: "wm_shell-sources", | |
| srcs: [ | |
| "src/**/*.java", | |
| ], | |
| path: "src", | |
| } | |
| // Aidls which can be used directly downstream of this library | |
| java_library { | |
| name: "WindowManager-Shell-aidls", | |
| srcs: ["src/**/*.aidl"], | |
| aidl: { | |
| include_dirs: ["frameworks/native/libs/gui"], | |
| local_include_dirs: ["shared/src/"], | |
| }, | |
| static_libs: ["WindowManager-Shell-shared"], | |
| } | |
| // TODO(b/168581922) protologtool do not support kotlin(*.kt) | |
| filegroup { | |
| name: "wm_shell-sources-kt", | |
| srcs: [ | |
| "src/**/*.kt", | |
| ], | |
| path: "src", | |
| } | |
| java_genrule { | |
| name: "wm_shell_protolog_src", | |
| srcs: [ | |
| ":protolog-impl", | |
| ":wm_shell-sources", | |
| ":wm_shell_protolog-groups", | |
| ], | |
| tools: [ | |
| "protologtool", | |
| "soong_javac_wrapper", | |
| ], | |
| cmd: "$(location protologtool) transform-protolog-calls " + | |
| "--protolog-class com.android.internal.protolog.ProtoLog " + | |
| "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " + | |
| "--loggroups-jar $(location :wm_shell_protolog-groups) " + | |
| "--javac-wrapper-path $(location soong_javac_wrapper) " + | |
| "--viewer-config-file-path /system_ext/etc/wmshell.protolog.pb " + | |
| "--output-srcjar $(out) " + | |
| "$(locations :wm_shell-sources)", | |
| out: ["wm_shell_protolog.srcjar"], | |
| } | |
| // End ProtoLog | |
| java_library { | |
| name: "WindowManager-Shell-lite-proto", | |
| srcs: [ | |
| "src/com/android/wm/shell/apptoweb/data/proto/*.proto", | |
| "src/com/android/wm/shell/desktopmode/education/data/proto/**/*.proto", | |
| "src/com/android/wm/shell/desktopmode/data/persistence/*.proto", | |
| ], | |
| proto: { | |
| type: "lite", | |
| }, | |
| } | |
| android_library { | |
| name: "WindowManager-Shell", | |
| defaults: ["WindowManager-Shell-defaults"], | |
| srcs: [ | |
| // TODO(b/168581922) protologtool do not support kotlin(*.kt) | |
| ":wm_shell-sources-kt", | |
| ":wm_shell_protolog_src", | |
| "src/com/android/wm/shell/EventLogTags.logtags", | |
| ], | |
| } | |
| java_defaults { | |
| name: "wmshell_defaults", | |
| required: [ | |
| "wmshell.protolog.pb", | |
| ], | |
| } | |
| // Extracted defaults to maintain consistency between the compiled target and the lint target. | |
| java_defaults { | |
| name: "WindowManager-Shell-defaults", | |
| resource_dirs: [ | |
| "res", | |
| ], | |
| static_libs: [ | |
| "android.gui.boxshadow-java", | |
| "//frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/user/model:bubbles-user-model", | |
| "//frameworks/base/packages/SystemUI/aconfig:com_android_systemui_flags_lib", | |
| "//frameworks/libs/systemui:com_android_systemui_shared_flags_lib", | |
| "//frameworks/libs/systemui:iconloader_base", | |
| "//frameworks/libs/systemui:msdl", | |
| "//frameworks/libs/systemui:tracinglib-platform", | |
| "//frameworks/libs/systemui:view_capture", | |
| "PlatformAnimationLib", | |
| "WindowManager-Shell-lite-proto", | |
| "WindowManager-Shell-shared", | |
| "WindowManager-Shell-aidls", | |
| "WindowManager-Shell-Pip", | |
| "wm_shell_protolog-groups", | |
| "am_flags_lib", | |
| "androidx-constraintlayout_constraintlayout", | |
| "androidx.appcompat_appcompat", | |
| "androidx.arch.core_core-runtime", | |
| "androidx.compose.material3_material3", | |
| "com.google.android.material_material", | |
| "androidx.core_core-ktx", | |
| "androidx.datastore_datastore", | |
| "androidx.dynamicanimation_dynamicanimation", | |
| "androidx.recyclerview_recyclerview", | |
| "androidx.tracing_tracing", | |
| "com_android_launcher3_flags_lib", | |
| "com_android_wm_shell_flags_lib", | |
| "PlatformAnimationLib", | |
| "dagger2", | |
| "jsr330", | |
| "kotlinx-coroutines-android", | |
| "kotlinx-coroutines-core", | |
| "lottie", | |
| "mechanics", | |
| "perfetto_trace_java_protos", | |
| "dynamiccolors", | |
| ], | |
| libs: [ | |
| // Soong fails to automatically add this dependency because all the | |
| // *.kt sources are inside a filegroup. | |
| "kotlin-annotations", | |
| ], | |
| flags_packages: [ | |
| "am_flags", | |
| "com_android_wm_shell_flags", | |
| ], | |
| kotlincflags: ["-Xjvm-default=all"], | |
| manifest: "AndroidManifest.xml", | |
| plugins: ["dagger2-compiler"], | |
| use_resource_processor: true, | |
| lint: { | |
| extra_check_modules: [ | |
| "ProtoLogLintChecker", | |
| ], | |
| }, | |
| errorprone: { | |
| extra_check_modules: [ | |
| "//external/nullaway:nullaway_plugin", | |
| ], | |
| javacflags: [ | |
| "-Xep:NullAway:WARN", | |
| "-XepOpt:NullAway:AnnotatedPackages=com.android.wm.shell", | |
| ], | |
| }, | |
| } | |
| // A dedicated library to ensure WindowManager-Shell raw sources are linted in presubmit. | |
| // (Android Lint ignores the generated .srcjars from `wm_shell_protolog_src`, which hides ProtoLog | |
| // validation errors in the main target). | |
| android_library { | |
| name: "WindowManager-Shell-untransformed", | |
| defaults: ["WindowManager-Shell-defaults"], | |
| srcs: [ | |
| ":wm_shell-sources-kt", | |
| ":wm_shell-sources", | |
| "src/com/android/wm/shell/EventLogTags.logtags", | |
| ], | |
| lint: { | |
| extra_check_modules: [ | |
| "ProtoLogLintChecker", | |
| ], | |
| }, | |
| } |