Android.bp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. //
  2. // Copyright (C) 2017 The Android Open Source Project
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. cc_defaults {
  17. name: "libnativebridge-dummy-defaults",
  18. host_supported: true,
  19. cflags: [
  20. "-Wall",
  21. "-Wextra",
  22. "-Werror",
  23. ],
  24. header_libs: ["libnativebridge-headers"],
  25. cppflags: ["-fvisibility=protected"],
  26. }
  27. cc_library_shared {
  28. name: "libnativebridge-dummy",
  29. srcs: ["DummyNativeBridge.cpp"],
  30. defaults: ["libnativebridge-dummy-defaults"],
  31. }
  32. cc_library_shared {
  33. name: "libnativebridge2-dummy",
  34. srcs: ["DummyNativeBridge2.cpp"],
  35. defaults: ["libnativebridge-dummy-defaults"],
  36. }
  37. cc_library_shared {
  38. name: "libnativebridge3-dummy",
  39. srcs: ["DummyNativeBridge3.cpp"],
  40. defaults: ["libnativebridge-dummy-defaults"],
  41. }
  42. // Build the unit tests.
  43. cc_defaults {
  44. name: "libnativebridge-tests-defaults",
  45. test_per_src: true,
  46. cflags: [
  47. "-Wall",
  48. "-Werror",
  49. ],
  50. srcs: [
  51. "CodeCacheCreate_test.cpp",
  52. "CodeCacheExists_test.cpp",
  53. "CodeCacheStatFail_test.cpp",
  54. "CompleteFlow_test.cpp",
  55. "InvalidCharsNativeBridge_test.cpp",
  56. "NativeBridge2Signal_test.cpp",
  57. "NativeBridgeVersion_test.cpp",
  58. "NeedsNativeBridge_test.cpp",
  59. "PreInitializeNativeBridge_test.cpp",
  60. "PreInitializeNativeBridgeFail1_test.cpp",
  61. "PreInitializeNativeBridgeFail2_test.cpp",
  62. "ReSetupNativeBridge_test.cpp",
  63. "UnavailableNativeBridge_test.cpp",
  64. "ValidNameNativeBridge_test.cpp",
  65. "NativeBridge3UnloadLibrary_test.cpp",
  66. "NativeBridge3GetError_test.cpp",
  67. "NativeBridge3IsPathSupported_test.cpp",
  68. "NativeBridge3InitAnonymousNamespace_test.cpp",
  69. "NativeBridge3CreateNamespace_test.cpp",
  70. "NativeBridge3LoadLibraryExt_test.cpp",
  71. ],
  72. shared_libs: [
  73. "liblog",
  74. "libnativebridge-dummy",
  75. ],
  76. header_libs: ["libbase_headers"],
  77. }
  78. cc_test {
  79. name: "libnativebridge-tests",
  80. defaults: ["libnativebridge-tests-defaults"],
  81. host_supported: true,
  82. shared_libs: ["libnativebridge"],
  83. }
  84. cc_test {
  85. name: "libnativebridge-lazy-tests",
  86. defaults: ["libnativebridge-tests-defaults"],
  87. shared_libs: ["libnativebridge_lazy"],
  88. }
  89. // Build the test for the C API.
  90. cc_test {
  91. name: "libnativebridge-api-tests",
  92. host_supported: true,
  93. test_per_src: true,
  94. srcs: [
  95. "NativeBridgeApi.c",
  96. ],
  97. header_libs: ["libnativebridge-headers"],
  98. }