Android.bp 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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/common/bubbles/*.java",
  46. "src/com/android/wm/shell/common/TriangleShape.java",
  47. "src/com/android/wm/shell/animation/Interpolators.java",
  48. "src/com/android/wm/shell/pip/PipContentOverlay.java",
  49. "src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java",
  50. "src/com/android/wm/shell/draganddrop/DragAndDropConstants.java",
  51. ],
  52. path: "src",
  53. }
  54. // Aidls which can be used directly downstream of this library
  55. filegroup {
  56. name: "wm_shell-aidls",
  57. srcs: [
  58. "src/**/*.aidl",
  59. ],
  60. path: "src",
  61. }
  62. // TODO(b/168581922) protologtool do not support kotlin(*.kt)
  63. filegroup {
  64. name: "wm_shell-sources-kt",
  65. srcs: [
  66. "src/**/*.kt",
  67. ],
  68. path: "src",
  69. }
  70. genrule {
  71. name: "wm_shell_protolog_src",
  72. srcs: [
  73. ":wm_shell_protolog-groups",
  74. ":wm_shell-sources",
  75. ],
  76. tools: ["protologtool"],
  77. cmd: "$(location protologtool) transform-protolog-calls " +
  78. "--protolog-class com.android.internal.protolog.common.ProtoLog " +
  79. "--protolog-impl-class com.android.wm.shell.protolog.ShellProtoLogImpl " +
  80. "--protolog-cache-class com.android.wm.shell.protolog.ShellProtoLogCache " +
  81. "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
  82. "--loggroups-jar $(location :wm_shell_protolog-groups) " +
  83. "--output-srcjar $(out) " +
  84. "$(locations :wm_shell-sources)",
  85. out: ["wm_shell_protolog.srcjar"],
  86. }
  87. genrule {
  88. name: "generate-wm_shell_protolog.json",
  89. srcs: [
  90. ":wm_shell_protolog-groups",
  91. ":wm_shell-sources",
  92. ],
  93. tools: ["protologtool"],
  94. cmd: "$(location protologtool) generate-viewer-config " +
  95. "--protolog-class com.android.internal.protolog.common.ProtoLog " +
  96. "--loggroups-class com.android.wm.shell.protolog.ShellProtoLogGroup " +
  97. "--loggroups-jar $(location :wm_shell_protolog-groups) " +
  98. "--viewer-conf $(out) " +
  99. "$(locations :wm_shell-sources)",
  100. out: ["wm_shell_protolog.json"],
  101. }
  102. genrule {
  103. name: "protolog.json.gz",
  104. srcs: [":generate-wm_shell_protolog.json"],
  105. out: ["wmshell.protolog.json.gz"],
  106. cmd: "$(location minigzip) -c < $(in) > $(out)",
  107. tools: ["minigzip"],
  108. }
  109. prebuilt_etc {
  110. name: "wmshell.protolog.json.gz",
  111. system_ext_specific: true,
  112. src: ":protolog.json.gz",
  113. filename_from_src: true,
  114. }
  115. // End ProtoLog
  116. java_library {
  117. name: "WindowManager-Shell-proto",
  118. srcs: ["proto/*.proto"],
  119. proto: {
  120. type: "nano",
  121. },
  122. }
  123. android_library {
  124. name: "WindowManager-Shell",
  125. srcs: [
  126. ":wm_shell_protolog_src",
  127. // TODO(b/168581922) protologtool do not support kotlin(*.kt)
  128. ":wm_shell-sources-kt",
  129. ":wm_shell-aidls",
  130. ],
  131. resource_dirs: [
  132. "res",
  133. ],
  134. static_libs: [
  135. "androidx.appcompat_appcompat",
  136. "androidx.arch.core_core-runtime",
  137. "androidx-constraintlayout_constraintlayout",
  138. "androidx.dynamicanimation_dynamicanimation",
  139. "androidx.recyclerview_recyclerview",
  140. "kotlinx-coroutines-android",
  141. "kotlinx-coroutines-core",
  142. "iconloader_base",
  143. "protolog-lib",
  144. "WindowManager-Shell-proto",
  145. "dagger2",
  146. "jsr330",
  147. ],
  148. libs: [
  149. // Soong fails to automatically add this dependency because all the
  150. // *.kt sources are inside a filegroup.
  151. "kotlin-annotations",
  152. ],
  153. kotlincflags: ["-Xjvm-default=enable"],
  154. manifest: "AndroidManifest.xml",
  155. plugins: ["dagger2-compiler"],
  156. }