BUILD.gn 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright (c) 2021 Project CHIP Authors
  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. import("//build_overrides/chip.gni")
  15. import("//build_overrides/pigweed.gni")
  16. import("$dir_pw_build/python.gni")
  17. import("${chip_root}/build/chip/java/rules.gni")
  18. pw_python_action("java_build_test") {
  19. inputs = [
  20. "expected_output/child_library_2_expected.json",
  21. "expected_output/grandchild_library_expected.json",
  22. "expected_output/child_library_expected.json",
  23. "expected_output/java_library_expected.json",
  24. "expected_output/child_prebuilt_expected.json",
  25. "expected_output/java_prebuilt_expected.json",
  26. ]
  27. deps = [ ":java_library" ]
  28. script = "test.py"
  29. stamp = true
  30. }
  31. java_library("java_library") {
  32. sources = [ "IncludedInSources.java" ]
  33. deps = [
  34. ":child_library",
  35. ":child_library_2",
  36. ":java_prebuilt",
  37. ]
  38. }
  39. java_library("child_library") {
  40. sources = [ "IncludedInChildSources.java" ]
  41. }
  42. java_library("child_library_2") {
  43. sources = [ "IncludedInChildSources2.java" ]
  44. deps = [ ":grandchild_library" ]
  45. }
  46. java_library("grandchild_library") {
  47. sources = [ "IncludedInGrandchildSources.java" ]
  48. }
  49. java_prebuilt("java_prebuilt") {
  50. jar_path = "prebuilt_jar.jar"
  51. deps = [ ":child_prebuilt" ]
  52. }
  53. java_prebuilt("child_prebuilt") {
  54. jar_path = "child_jar.jar"
  55. }