OLD | NEW |
1 {# Copyright 2016 The Chromium Authors. All rights reserved. #} | 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 #} | 2 {# Use of this source code is governed by a BSD-style license that can be #} |
3 {# found in the LICENSE file. #} | 3 {# found in the LICENSE file. #} |
| 4 {% macro expand_deps(variables, prefix) %} |
| 5 {% if variables is defined %} |
| 6 {% for path in variables.prebuilts %} |
| 7 {{ prefix }} files("{{ path }}") |
| 8 {% endfor %} |
| 9 {% for proj in variables.java_project_deps %} |
| 10 {{ prefix }} project(":{{ proj }}") |
| 11 {% endfor %} |
| 12 {% for proj in variables.android_project_deps %} |
| 13 {{ prefix }} project(path: ":{{ proj }}", configuration: "debug") |
| 14 {% endfor %} |
| 15 {% endif %} |
| 16 {% endmacro %} |
| 17 |
4 dependencies { | 18 dependencies { |
5 {% for path in prebuilts %} | 19 {{ expand_deps(main, 'compile') }} |
6 {{ depCompileName }} files("{{ path }}") | 20 {{ expand_deps(test, 'testCompile') }} |
7 {% endfor %} | 21 {{ expand_deps(android_test, 'androidTestCompile') }} |
8 {% for proj in java_project_deps %} | |
9 {{ depCompileName }} project(":{{ proj }}") | |
10 {% endfor %} | |
11 {% for proj in android_project_deps %} | |
12 {{ depCompileName }} project(path: ":{{ proj }}", configuration: "debug") | |
13 {% endfor %} | |
14 } | 22 } |
OLD | NEW |