Android.bp 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. // 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. package {
  15. // See: http://go/android-license-faq
  16. // A large-scale-change added 'default_applicable_licenses' to import
  17. // all of the 'license_kinds' from "frameworks_base_license"
  18. // to get the below license kinds:
  19. // SPDX-license-identifier-Apache-2.0
  20. default_applicable_licenses: ["frameworks_base_license"],
  21. }
  22. // Begin ProtoLog
  23. java_library {
  24. name: "wm_shell_protolog-groups",
  25. srcs: [
  26. "src/com/android/wm/shell/protolog/ShellProtoLogGroup.java",
  27. ":protolog-common-src",
  28. ],
  29. }
  30. filegroup {
  31. name: "wm_shell-sources",
  32. srcs: [
  33. "src/**/*.java",
  34. ],
  35. path: "src",
  36. }
  37. // Sources that have no dependencies that can be used directly downstream of this library
  38. filegroup {
  39. name: "wm_shell_util-sources",
  40. srcs: [
  41. "src/com/android/wm/shell/util/**/*.java",
  42. "src/com/android/wm/shell/common/split/SplitScreenConstants.java",
  43. "src/com/android/wm/shell/sysui/ShellSharedConstants.java",
  44. "src/com/android/wm/shell/common/TransactionPool.java",
  45. "src/com/android/wm/shell/animation/Interpolators.java",
  46. "src/com/android/wm/shell/pip/PipContentOverlay.java",
  47. "src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java",
  48. "src/com/android/wm/shell/draganddrop/DragAndDropConstants.java",
  49. ],
  50. path: "src",
  51. }
  52. // Aidls which can be used directly downstream of this library
  53. filegroup {
  54. name: "wm_shell-aidls",
  55. srcs: [
  56. "src/**/*.aidl",
  57. ],
  58. path: "src",
  59. }
  60. // TODO(b/168581922) protologtool do not support kotlin(*.kt)
  61. filegroup {
  62. name: "wm_shell-sources-kt",
  63. srcs: [
  64. "src/**/*.kt",
  65. ],
  66. path: "src",
  67. }
  68. genrule {
  69. name: "wm_shell_protolog_src",
  70. srcs: [
  71. ":wm_shell_protolog-groups",
  72. ":wm_shell-sources",
  73. ],
  74. tools: ["protologtool"],
  75. cmd: "$(location protologtool) transform-protolog-calls " +
  76. "--protolog-class com.android.internal.protolog.common.ProtoLog " +
  77. "--protolog-impl-class com.android.wm.shell.protolog.ShellProtoLogImpl " +
  78. "--protolog-cache-class com.android.wm.shell.protolog.ShellProtoLogCache " +
  79. "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
  80. "--loggroups-jar $(location :wm_shell_protolog-groups) " +
  81. "--output-srcjar $(out) " +
  82. "$(locations :wm_shell-sources)",
  83. out: ["wm_shell_protolog.srcjar"],
  84. }
  85. genrule {
  86. name: "generate-wm_shell_protolog.json",
  87. srcs: [
  88. ":wm_shell_protolog-groups",
  89. ":wm_shell-sources",
  90. ],
  91. tools: ["protologtool"],
  92. cmd: "$(location protologtool) generate-viewer-config " +
  93. "--protolog-class com.android.internal.protolog.common.ProtoLog " +
  94. "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
  95. "--loggroups-jar $(location :wm_shell_protolog-groups) " +
  96. "--viewer-conf $(out) " +
  97. "$(locations :wm_shell-sources)",
  98. out: ["wm_shell_protolog.json"],
  99. }
  100. genrule {
  101. name: "protolog.json.gz",
  102. srcs: [":generate-wm_shell_protolog.json"],
  103. out: ["wmshell.protolog.json.gz"],
  104. cmd: "$(location minigzip) -c < $(in) > $(out)",
  105. tools: ["minigzip"],
  106. }
  107. prebuilt_etc {
  108. name: "wmshell.protolog.json.gz",
  109. system_ext_specific: true,
  110. src: ":protolog.json.gz",
  111. filename_from_src: true,
  112. }
  113. // End ProtoLog
  114. java_library {
  115. name: "WindowManager-Shell-proto",
  116. srcs: ["proto/*.proto"],
  117. proto: {
  118. type: "nano",
  119. },
  120. }
  121. android_library {
  122. name: "WindowManager-Shell",
  123. srcs: [
  124. ":wm_shell_protolog_src",
  125. // TODO(b/168581922) protologtool do not support kotlin(*.kt)
  126. ":wm_shell-sources-kt",
  127. ":wm_shell-aidls",
  128. ],
  129. resource_dirs: [
  130. "res",
  131. ],
  132. static_libs: [
  133. "androidx.appcompat_appcompat",
  134. "androidx.arch.core_core-runtime",
  135. "androidx-constraintlayout_constraintlayout",
  136. "androidx.dynamicanimation_dynamicanimation",
  137. "androidx.recyclerview_recyclerview",
  138. "kotlinx-coroutines-android",
  139. "kotlinx-coroutines-core",
  140. "iconloader_base",
  141. "protolog-lib",
  142. "WindowManager-Shell-proto",
  143. "dagger2",
  144. "jsr330",
  145. ],
  146. libs: [
  147. // Soong fails to automatically add this dependency because all the
  148. // *.kt sources are inside a filegroup.
  149. "kotlin-annotations",
  150. ],
  151. kotlincflags: ["-Xjvm-default=enable"],
  152. manifest: "AndroidManifest.xml",
  153. plugins: ["dagger2-compiler"],
  154. }