dependencies.jinja 911 B

12345678910111213141516171819202122232425262728
  1. {# Copyright 2016 The Chromium Authors. All rights reserved. #}
  2. {# Use of this source code is governed by a BSD-style license that can be #}
  3. {# found in the LICENSE file. #}
  4. {% macro expand_deps(variables, prefix) %}
  5. {% if variables is defined %}
  6. {% if variables.prebuilts is defined %}
  7. {% for path in variables.prebuilts %}
  8. {{ prefix }} files("{{ path }}")
  9. {% endfor %}
  10. {% endif %}
  11. {% if variables.java_project_deps is defined %}
  12. {% for proj in variables.java_project_deps %}
  13. {{ prefix }} project(":{{ proj }}")
  14. {% endfor %}
  15. {% endif %}
  16. {% if variables.android_project_deps is defined %}
  17. {% for proj in variables.android_project_deps %}
  18. {{ prefix }} project(path: ":{{ proj }}")
  19. {% endfor %}
  20. {% endif %}
  21. {% endif %}
  22. {% endmacro %}
  23. dependencies {
  24. {{ expand_deps(main, 'implementation') }}
  25. {{ expand_deps(test, 'testImplementation') }}
  26. {{ expand_deps(android_test, 'androidTestImplementation') }}
  27. }