| {namespace buck.targets} |
| |
| /***/ |
| {template .soyweb} |
| {call buck.page} |
| {param title: 'buck targets' /} |
| {param content} |
| |
| |
| {call buck.command} |
| {param overview} |
| Lists the build targets available in the current project. |
| |
| <p> |
| |
| The following will print all build targets in the project (sorted |
| alphabetically) to standard out: |
| |
| <pre>buck targets</pre> |
| |
| This command can be handy in programmatic tasks, such as running all of the |
| Java tests under <code>//java/com/myproject</code>: |
| |
| {literal}<pre> |
| buck targets --type java_test | \ |
| grep '//java/com/myproject' | \ |
| xargs buck test |
| </pre>{/literal} |
| |
| <p> |
| |
| A list of rules can also be passed into <code>buck targets</code> and Buck will |
| only print out target information for those rules. For example: |
| |
| {literal}<pre> |
| buck targets --show_output //java/com/myproject:binary |
| > //java/com/myproject:binary buck-out/gen/java/com/myproject/binary.apk |
| </pre>{/literal} |
| |
| {/param} |
| |
| {param params} |
| {call buck.param} |
| {param name: 'type' /} |
| {param desc} |
| The types of target to filter by. For example: |
| <pre> |
| buck targets --type java_test java_binary |
| </pre> |
| {/param} |
| {/call} |
| |
| {call buck.param} |
| {param name: 'referenced_file' /} |
| {param desc} |
| Filters targets by the list of rules that include |
| {sp}<code>referenced_file</code> in their transitive closure. |
| |
| <p> |
| |
| For example, if a developer wanted to run all tests that could be affected by |
| particular file, they would run: |
| {literal}<pre> |
| buck targets --type java_test \ |
| --referenced_file java/com/example/Foo.java | |
| xargs buck test |
| </pre>{/literal} |
| {/param} |
| {/call} |
| |
| {call buck.param} |
| {param name: 'json' /} |
| {param desc} |
| Print JSON representation of each target |
| {/param} |
| {/call} |
| |
| {call buck.param} |
| {param name: 'resolvealias' /} |
| {param desc} |
| Print the fully-qualified build target for the specified alias[es]. This |
| command also accepts build targets. See <a |
| href="{ROOT}concept/buckconfig.html"><code>.buckconfig</code></a> for more |
| information. |
| {/param} |
| {/call} |
| |
| {call buck.param} |
| {param name: 'show_output' /} |
| {param desc} |
| Prints the relative path to the output for each rule after the rule name. |
| {/param} |
| {/call} |
| |
| {/param} |
| |
| {/call} |
| |
| {/param} // content |
| {/call} // buck.page |
| {/template} |