blob: fe4dc5e946e4eafa73702b13c6421a6993c9cee4 [file] [log] [blame]
/*
* Copyright 2018-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
{namespace buck}
/**
* @param title
* @param? subtitle
* @param content
* @param navid
* @param? prettify true if https://code.google.com/p/google-code-prettify/
* should be used.
* @param description the content of the og:description meta tag
*/
{template .page}
{call .header}
{param navid: $navid /}
{param title: $title /}
{param subtitle: $subtitle /}
{param prettify: $prettify /}
{param description: $description /}
{/call}
<div class="{css overview}">
{$content|noAutoescape}
</div>
{call .footer}
{param navid: $navid /}
{param prettify: $prettify /}
{/call}
{/template}
/**
* @param title
* @param? subtitle
* @param navid
* @param? prettify true if https://code.google.com/p/google-code-prettify/
* should be used.
* @param description the content of the og:description meta tag
*/
{template .header}
{let $fullTitle}
Buck: {$title}
{/let}
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns#">
<script>
var loc = new String(window.location);
if (loc.indexOf('facebook.github.io/buck') != -1) {lb}
window.location.replace(loc.replace('facebook.github.io/buck', 'buck.build'));
{rb}
</script>
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){lb}if(f.fbq)return;n=f.fbq=function(){lb}n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments){rb};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s){rb}(window,document,'script','//connect.facebook.net/en_US/fbevents.js');
fbq('init', '1637165926500152');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1637165926500152&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
<title>{$fullTitle}</title>
<link type="image/png" rel="shortcut icon" href="{ROOT}static/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
<meta http-equiv="content-type" content="text/html;charset=utf-8">
{if $prettify}
<link type="text/css"
rel="stylesheet"
href="{ROOT}google-code-prettify/prettify.css"
>
{/if}
// List buck.css second to override prettify.
<link type="text/css" rel="stylesheet" href="{ROOT}static/buck.css">
<link type="text/css" rel="stylesheet" href="{ROOT}static/search.css">
<link
type="text/css"
rel="stylesheet"
href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css" />
// TODO(mbolin): Pass $og_type in as a parameter.
{let $og_type}
{switch $navid}
{case 'home'}
website
{default}
article
{/switch}
{/let}
<meta property="og:locale" content="en_US">
<meta property="og:title" content="{$title}">
<meta property="og:site_name" content="Buck: a build tool">
<meta property="og:image" content="http://buck.build/static/og.png">
<meta property="og:type" content="{$og_type}">
<meta property="og:description" content="{$description}">
<meta property="fb:admins" content="{FB_APP_ID}">
<script>
{literal}
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-44373548-18', 'auto');
ga('send', 'pageview');
{/literal}
</script>
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {lb}
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId={FB_APP_ID}";
fjs.parentNode.insertBefore(js, fjs);
{rb}(document, 'script', 'facebook-jssdk'));</script>
<header class='topbar'><nav class='width'>
<a href='http://buck.build/'><h1>Buck</h1></a>
<ul class='menu'>
<li class="algolia-search-wrapper">
<input id="algolia-doc-search" type="search" placeholder="Search docs..." />
</li>
<li><a href='{ROOT}setup/getting_started.html'>Docs</a>
<li><a href='https://github.com/facebook/buck/issues'>Issues</a>
<li><a href='https://github.com/facebook/buck'>GitHub</a>
</ul>
</nav></header>
{if $navid == 'home'}
<header class='hero'><div class='width'>
<hgroup>
<h1>
A high-performance build tool
</h1>
<a class='button' href='{ROOT}setup/getting_started.html'>Getting Started</a>&nbsp;
<a class='button' href='https://github.com/facebook/buck'>GitHub</a>
</hgroup>
<aside>
<img id="super_console_sample"
src="{ROOT}static/buck-build-15fps.gif"
alt="Chrome Tracing Sample">
</aside>
</div></header>
{/if}
<section class='content'><div class='width'>
{if $navid != 'home'}
<article id="content">
<h1>{$title}{if $subtitle}:<div class="subtitle">{$subtitle}</div>{/if}</h1>
{else}
<landing-page>
{/if}
{/template}
/**
* @param navid The current page's navigation id.
* @param? prettify true if https://code.google.com/p/google-code-prettify/
* should be used.
*/
{template .footer}
{if $navid != 'home'}
</article>
<nav>
{call table_of_contents.main data="all"}
{param navid: $navid /}
{/call}
</nav>
{else}
</landing-page>
{/if}
</div></section>
<footer><div class='width'>
&copy; Copyright Facebook, 2013 - 2019
</div></footer>
<!-- Algolia Search Code -->
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js">
</script>
<script>
{literal}
docsearch({
apiKey: 'c25b7174e8f6161ce5fdd44bb0b95081',
indexName: 'buckbuild',
inputSelector: '#algolia-doc-search',
debug: false // Set debug to true if you want to inspect the dropdown
});
{/literal}
</script>
<!-- End Algolia Search Code -->
{if hasData() and $prettify}
<script src="{ROOT}google-code-prettify/prettify.js"></script>
<script>prettyPrint()</script>
{/if}
</body>
</html>
{/template}
/**
* Used to format an argument to a build rule.
*
* @param name Name of the argument.
* @param? default What the default value should be. If null, the argument is
* required.
* @param desc Prose description of the argument.
* @param? deprecated Whether this argument has been deprecated
* @param? deprecationAlternative An alternative to use rather than this deprecated property
*/
{template .arg}
<li id="{$name}" class="arg">
<h3>
<code class="argName">{$name}</code>
{sp}
<span class="argDefault">
{if isNonnull($default)}
(defaults to <code>{$default}</code>)
{else}
(required)
{/if}
</span>
{sp}
<a class="inline-link" href="#{$name}">#</a>
</h3>
{if $deprecated}
<p class="warning-banner">
This property is deprecated. {if isNonnull($deprecationAlternative)}{$deprecationAlternative|noAutoescape}{/if}
</p>
{/if}
<p>
{$desc|noAutoescape}
</p>
</li>
{/template}
/**
* @param overview HTML description of the rule.
* @param status one of FROZEN, UNFROZEN, or DEPRECATED to indicate the
current level of support for the rule.
* @param? args HTML documentation for each arg for the rule.
* Should be created using multiple applications of the {buck.arg}
* template.
* @param? flavors HTML documentation for each flavor supported by the rule.
* Should be created using multiple applications of the {buck.arg}
* template.
* @param? examples HTML documentation that shows examples of the build
* rule in action.
* @param? furtherexp Further explanation; HTML shown after arguments and
examples.
*/
{template .rule}
{switch $status}
{case 'FROZEN'}
// Nothing to show here.
{case 'UNFROZEN'}
<p><small>This is liable to change in the future.</small></p>
{case 'DEPRECATED'}
<p><small>This will be removed in the future.</small></p>
{/switch}
{$overview|noAutoescape}
<h2>Arguments</h2>
<ul class="{css arglist}">
{$args|noAutoescape}
{call buck.visibility_arg /}
{call buck.licenses_arg /}
{call buck.labels_arg /}
</ul>
{if $flavors}
<h2>Flavors</h2>
{$flavors|noAutoescape}
{/if}
{if $examples}
<h2>Examples</h2>
{$examples|noAutoescape}
{/if}
{if $furtherexp}
{$furtherexp|noAutoescape}
{/if}
{/template}
/**
* Used to format an argument to a build rule.
*
* @param? name Name of the argument.
* @param? default What the default value should be. If null, the argument is
* required.
* @param desc Prose description of the argument.
*/
{template .functionArg}
<li class="{css arg}">
{if $name}
<code>{$name}</code>{sp}
{/if}
{if isNonnull($default)}
(defaults to <code>{$default}</code>)
{sp}
{/if}
{$desc|noAutoescape}
{/template}
/**
* Used to format a parameter of a command.
*
* @param name Name of the parameter.
* @param? nodash If set, do not add "--" prefix to $name.
* @param? alias The alias for this parameter.
* @param desc Prose description of the parameter.
*/
{template .param}
<li class="{css arg}"><code>{if not $nodash}--{/if}{$name}</code>
{sp}
{if $alias}
<code>(-{$alias})</code>
{/if}
{sp}
{$desc|noAutoescape}
{/template}
/**
* @param overview HTML description of the command.
* @param? params HTML documentation for each param of the command.
* Should be created using multiple applications of the {buck.param}
* template.
* @param? examples HTML documentation that shows examples of the build
* rule in action.
*/
{template .command}
{$overview|noAutoescape}
{if $params}
<h2>Parameters</h2>
<ul class="{css arglist}">
{$params|noAutoescape}
</ul>
{/if}
{if $examples}
<h2>Examples</h2>
{$examples|noAutoescape}
{/if}
{/template}
/**
* @param overview HTML description of the function.
* @param status one of FROZEN, UNFROZEN, or DEPRECATED to indicate the
current level of support for the rule.
* @param? args HTML documentation for each arg for the function.
* Should be created using multiple applications of the {buck.functionArg}
* template.
* @param? examples HTML documentation that shows examples of the function
* in action.
* @param? furtherexp Further explanation; HTML shown after arguments and
examples.
*/
{template .function}
{switch $status}
{case 'FROZEN'}
// Nothing to show here.
{case 'UNFROZEN'}
<p><small>This is liable to change in the future.</small></p>
{case 'DEPRECATED'}
<p><small>This will be removed in the future.</small></p>
{/switch}
{$overview|noAutoescape}
{if $args}
<h2>Arguments</h2>
<ul class="{css arglist}">
{$args|noAutoescape}
</ul>
{/if}
{if $examples}
<h2>Examples</h2>
{$examples|noAutoescape}
{/if}
{if $furtherexp}
{$furtherexp|noAutoescape}
{/if}
{/template}
/**
* @param? rendered_text Optionally, specify the rendered text for the
* link. If not specified, the rendered text is
* "Key Concepts".
*/
{template .key_concepts_link}
{if $rendered_text}
<a href="{ROOT}about/overview.html">{$rendered_text}</a>
{else}
<a href="{ROOT}about/overview.html">Key Concepts</a>
{/if}
{/template}
/**
* @param name
* @param? section
*/
{template .ruleLink}
{if not $section}
<a href="{ROOT}rule/{$name}.html"><code>{$name}</code></a>
{else}
<a href="{ROOT}rule/{$name}.html#{$section}"><code>{$section}</code></a>
{/if}
{/template}
/***/
{template .abi_rule_keys}
{call .concept_link_heading}{param page : 'rule_keys' /}{param heading : 'abi_rule_keys' /}{param name : 'ABI rule keys' /}{/call}
{/template}
/***/
{template .android_aar}
{call .ruleLink}{param name : 'android_aar' /}{/call}
{/template}
/***/
{template .android_binary}
{call .ruleLink}{param name : 'android_binary' /}{/call}
{/template}
/***/
{template .android_build_config}
{call .ruleLink}{param name : 'android_build_config' /}{/call}
{/template}
/***/
{template .android_instrumentation_apk}
{call .ruleLink}{param name : 'android_instrumentation_apk' /}{/call}
{/template}
/***/
{template .android_library}
{call .ruleLink}{param name : 'android_library' /}{/call}
{/template}
/***/
{template .android_manifest}
{call .ruleLink}{param name : 'android_manifest' /}{/call}
{/template}
/***/
{template .android_prebuilt_aar}
{call .ruleLink}{param name : 'android_prebuilt_aar' /}{/call}
{/template}
/***/
{template .android_resource}
{call .ruleLink}{param name : 'android_resource' /}{/call}
{/template}
/***/
{template .apk_genrule}
{call .ruleLink}{param name : 'apk_genrule' /}{/call}
{/template}
/***/
{template .apple_binary}
{call .ruleLink}{param name: 'apple_binary' /}{/call}
{/template}
/***/
{template .apple_bundle}
{call .ruleLink}{param name: 'apple_bundle' /}{/call}
{/template}
/***/
{template .apple_library}
{call .ruleLink}{param name: 'apple_library' /}{/call}
{/template}
/***/
{template .command_alias}
{call .ruleLink}{param name : 'command_alias' /}{/call}
{/template}
/***/
{template .cxx_binary}
{call .ruleLink}{param name : 'cxx_binary' /}{/call}
{/template}
/***/
{template .cxx_genrule}
{call .ruleLink}{param name : 'cxx_genrule' /}{/call}
{/template}
/***/
{template .cxx_library}
{call .ruleLink}{param name : 'cxx_library' /}{/call}
{/template}
/***/
{template .cxx_lua_extension}
{call .ruleLink}{param name : 'cxx_lua_extension' /}{/call}
{/template}
/***/
{template .genrule}
{call .ruleLink}{param name : 'genrule' /}{/call}
{/template}
/***/
{template .groovy_library}
{call .ruleLink}{param name : 'groovy_library' /}{/call}
{/template}
/***/
{template .haskell_binary}
{call .ruleLink}{param name : 'haskell_binary' /}{/call}
{/template}
/***/
{template .haskell_library}
{call .ruleLink}{param name : 'haskell_library' /}{/call}
{/template}
/***/
{template .java_binary}
{call .ruleLink}{param name : 'java_binary' /}{/call}
{/template}
/***/
{template .java_library}
{call .ruleLink}{param name : 'java_library' /}{/call}
{/template}
/***/
{template .java_test}
{call .ruleLink}{param name : 'java_test' /}{/call}
{/template}
/***/
{template .keystore}
{call .ruleLink}{param name : 'keystore' /}{/call}
{/template}
/***/
{template .kotlin_library}
{call .ruleLink}{param name : 'kotlin_library' /}{/call}
{/template}
/***/
{template .kotlin_test}
{call .ruleLink}{param name : 'kotlin_test' /}{/call}
{/template}
/***/
{template .lua_binary}
{call .ruleLink}{param name : 'lua_binary' /}{/call}
{/template}
/***/
{template .lua_library}
{call .ruleLink}{param name : 'lua_library' /}{/call}
{/template}
/***/
{template .ndk_library}
{call .ruleLink}{param name : 'ndk_library' /}{/call}
{/template}
/***/
{template .prebuilt_jar}
{call .ruleLink}{param name : 'prebuilt_jar' /}{/call}
{/template}
/***/
{template .prebuilt_cxx_library}
{call .ruleLink}{param name : 'prebuilt_cxx_library' /}{/call}
{/template}
/***/
{template .prebuilt_cxx_library_group}
{call .ruleLink}{param name : 'prebuilt_cxx_library_group' /}{/call}
{/template}
/***/
{template .prebuilt_haskell_library}
{call .ruleLink}{param name : 'prebuilt_haskell_library' /}{/call}
{/template}
/***/
{template .prebuilt_python_library}
{call .ruleLink}{param name : 'prebuilt_python_library' /}{/call}
{/template}
/***/
{template .python_binary}
{call .ruleLink}{param name : 'python_binary' /}{/call}
{/template}
/***/
{template .python_library}
{call .ruleLink}{param name : 'python_library' /}{/call}
{/template}
/***/
{template .python_test}
{call .ruleLink}{param name : 'python_test' /}{/call}
{/template}
/***/
{template .remote_file}
{call .ruleLink}{param name : 'remote_file' /}{/call}
{/template}
/***/
{template .sh_binary}
{call .ruleLink}{param name : 'sh_binary' /}{/call}
{/template}
/***/
{template .reexport_all_header_dependencies}
{call .ruleLink}
{param name : 'cxx_library' /}
{param section : 'reexport_all_header_dependencies' /}
{/call}
{/template}
/***/
{template .skylark}
{call .concept_link_heading}{param page : 'skylark' /}{param heading : 'migration' /}{param name : 'Python DSL to Skylark migration' /}{/call}
{/template}
/**
* @param name Specify the name of the function to link to.
* @param? rendered_text Optionally, specify the rendered text for the
* link. If not specified, the rendered text is
* the name of the function.
*
* Examples
*
* {call buck.function_link}{param name: 'allow_unsafe_import' /}{/call}
*
* {call buck.function_link}{param name: 'allow_unsafe_import' /}{param rendered_text: 'a bad function' /}{/call}
*
*/
{template .function_link}
{if $rendered_text}
<a href="{ROOT}function/{$name}.html">{$rendered_text}</a>
{else}
<a href="{ROOT}function/{$name}.html"><code>{$name}()</code></a>
{/if}
{/template}
/***/
{template .fn_add_build_file_dep}
<a href="{ROOT}function/add_build_file_dep.html"><code>add_build_file_dep()</code></a>
{/template}
/***/
{template .fn_flatten_dicts}
<a href="{ROOT}function/flatten_dicts.html"><code>flatten_dicts()</code></a>
{/template}
/***/
{template .fn_get_base_path}
<a href="{ROOT}function/get_base_path.html"><code>get_base_path()</code></a>
{/template}
/***/
{template .fn_glob}
<a href="{ROOT}function/glob.html"><code>glob()</code></a>
{/template}
/***/
{template .fn_include_defs}
<a href="{ROOT}function/include_defs.html"><code>include_defs()</code></a>
{/template}
/***/
{template .fn_host_info}
<a href="{ROOT}function/host_info.html"><code>host_info()</code></a>
{/template}
/***/
{template .fn_load}
<a href="{ROOT}function/load.html"><code>load()</code></a>
{/template}
/***/
{template .fn_read_config}
<a href="{ROOT}function/read_config.html"><code>read_config()</code></a>
{/template}
/***/
{template .string_parameter_macros}
<a href="{ROOT}function/string_parameter_macros.html">string parameter macros</a>
{/template}
/**
* @param page
* @param name
* @param? navid
*/
{template .concept_link}
<a href="{ROOT}concept/{$page}.html{if isNonnull($navid)}#{$navid}{/if}">{$name|noAutoescape}</a>
{/template}
/**
* @param page
* @param name
* @param heading
*/
{template .concept_link_heading}
<a href="{ROOT}concept/{$page}.html#{$heading}">{$name}</a>
{/template}
/***/
{template .build_file}
{call .concept_link}{param page: 'build_file' /}{param name: 'build file' /}{/call}
{/template}
/***/
{template .build_rule}
{call .concept_link}{param page: 'build_rule' /}{param name: 'build rule' /}{/call}
{/template}
/***/
{template .build_target}
{call .concept_link}{param page: 'build_target' /}{param name: 'build target' /}{/call}
{/template}
/***/
{template .build_target_pattern}
{call .concept_link}
{param page: 'build_target_pattern' /}
{param name: 'build target pattern' /}
{/call}
{/template}
/***/
{template .setup_install}
<a href="{ROOT}setup/install.html">Downloading and Installing Buck</a>
{/template}
/***/
{template .macros}
<a href="{ROOT}extending/macros.html">macros</a>
{/template}
/***/
{template .setup_build_intellij_plugin}
<a href="{ROOT}setup/intellij_plugin_build.html">Building the Buck Intellij Plugin</a>
{/template}
/***/
{template .buckd}
<a href="{ROOT}concept/buckd.html"><code>buckd</code></a>
{/template}
/**
* @param name
* @param? section
* @param? rendered_text
*/
{template .cmd_link}
{if not $section}
{if $rendered_text}
<a href="{ROOT}command/{$name}.html">{$rendered_text|noAutoescape}</a>
{else}
<a href="{ROOT}command/{$name}.html"><code>buck {$name}</code></a>
{/if}
{else}
{if $rendered_text}
<a href="{ROOT}command/{$name}.html#{$section}">{$rendered_text|noAutoescape}</a>
{else}
<a href="{ROOT}command/{$name}.html#{$section}"><code>{$section}</code></a>
{/if}
{/if}
{/template}
/***/
{template .cmd_audit}
{call .cmd_link}{param name: 'audit' /}{/call}
{/template}
/***/
{template .cmd_build}
{call .cmd_link}{param name : 'build' /}{/call}
{/template}
/***/
{template .cmd_clean}
{call .cmd_link}{param name : 'clean' /}{/call}
{/template}
/***/
{template .cmd_fetch}
{call .cmd_link}{param name : 'fetch' /}{/call}
{/template}
/***/
{template .cmd_fix}
{call .cmd_link}{param name : 'fix' /}{/call}
{/template}
/***/
{template .cmd_install}
{call .cmd_link}{param name : 'install' /}{/call}
{/template}
/***/
{template .cmd_kill}
{call .cmd_link}{param name : 'kill' /}{/call}
{/template}
/***/
{template .cmd_killall}
{call .cmd_link}{param name : 'killall' /}{/call}
{/template}
/***/
{template .cmd_project}
{call .cmd_link}{param name : 'project' /}{/call}
{/template}
/***/
{template .cmd_root}
{call .cmd_link}{param name : 'root' /}{/call}
{/template}
/***/
{template .cmd_run}
{call .cmd_link}{param name : 'run' /}{/call}
{/template}
/***/
{template .cmd_targets}
{call .cmd_link}{param name: 'targets' /}{/call}
{/template}
/***/
{template .cmd_test}
{call .cmd_link}{param name: 'test' /}{/call}
{/template}
/***/
{template .cmd_uninstall}
{call .cmd_link}{param name : 'uninstall' /}{/call}
{/template}
/***/
{template .cmd_query}
{call .cmd_link}{param name : 'query' /}{/call}
{/template}
/***/
{template .buckconfig_link}
<a href="{ROOT}files-and-dirs/buckconfig.html"><code>.buckconfig</code></a>
{/template}
/***/
{template .buck_out_link}
<a href="{ROOT}files-and-dirs/buck-out.html"><code>buck-out</code></a>
{/template}
/***/
{template .name_arg}
{call buck.arg}
{param name: 'name' /}
{param desc}
The <em>short name</em> for this {call buck.build_target /}.
{/param}
{/call}
{/template}
/***/
{template .deps_query_arg}
{call buck.arg}
{param name: 'deps_query' /}
{param default : 'None' /}
{param desc}
Status: <strong>experimental/unstable</strong>.
The deps query takes a query string that accepts the following query functions, and appends the
output of the query to the declared deps:
{literal}
<ul style="line-height:0.5em">
<li><code>attrfilter</code></li>
<li><code>deps</code></li>
<li><code>except</code></li>
<li><code>intersect</code></li>
<li><code>filter</code></li>
<li><code>kind</code></li>
<li><code>set</code></li>
<li><code>union</code></li>
</ul>
{/literal}
The macro <code>$declared_deps</code> may be used anywhere a target literal pattern is expected
in order to refer to the explicit deps of this rule as they appear in the rule's definition.
For example, if your build rule declares
{literal}<pre class="prettyprint lang-py">
android_library(
name = 'lib',
deps = ['//foo:foo'],
deps_query = '$declared_deps',
)</pre>
{/literal}
then the macro <code>$declared_deps</code> would be expanded to a
literal <code>set(//foo:foo)</code>.
Some example queries:
{literal}<pre>
"filter({name_regex}, $declared_deps)".format(name_regex='//.*')
"attrfilter(annotation_processors, com.foo.Processor, $declared_deps)"</pre>
{/literal}
{/param}
{/call}
{/template}
/***/
{template .provided_deps_query_arg}
{call buck.arg}
{param name: 'provided_deps_query' /}
{param default : 'None' /}
{param desc}
Status: <strong>experimental/unstable</strong>.
The provided deps query functions in the same way as the deps query, but the referenced deps
using <code>$declared</code> are the provided deps of the target, and the results of the query
are appended to the declared provided deps.
{/param}
{/call}
{/template}
/***/
{template .platform_deps_arg}
{call buck.arg}
{param name : 'platform_deps' /}
{param default : '[]' /}
{param desc}
Platform specific dependencies.
These should be specified as a list of pairs where the first element is an
un-anchored regex (in java.util.regex.Pattern syntax) against which the
platform name is matched, and the second element is a list of
dependencies (same format as <code>deps</code>) that are exported
if the platform matches the regex.
See <code>deps</code> for more information.
{/param}
{/call}
{/template}
/***/
{template .licenses_arg}
{call buck.arg}
{param name: 'licenses' /}
{param default: '[]' /}
{param desc}
Set of license files for this library. To get the list of license files for a given{sp}
{call buck.build_rule /} and all of its dependencies, you can use {call buck.cmd_query /}.
{/param}
{/call}
{/template}
/***/
{template .labels_arg}
{call buck.arg}
{param name: 'labels' /}
{param default: '[]' /}
{param desc}
Set of arbitrary strings which allow you to annotate a {call buck.build_rule /} with tags
that can be searched for over an entire dependency tree using {call buckquery.attrfilter /}.
{/param}
{/call}
{/template}
/***/
{template .visibility_arg}
{call buck.arg}
{param name : 'visibility' /}
{param default : '[]' /}
{param desc}
List of <a href="{ROOT}concept/build_target_pattern.html">build
target patterns</a> that identify the build rules that can include
this rule as a dependency, for example, by listing it in
their <code>deps</code> or <code>exported_deps</code> attributes.
For more information,
see {call buck.concept_link}{param page: 'visibility' /}{param name: 'visibility' /}{/call}.
{/param}
{/call}
{/template}
/***/
{template .tests_arg}
{call buck.arg}
{param name : 'tests' /}
{param default : '[]' /}
{param desc}
List of <a href="{ROOT}concept/build_target.html">build targets</a> that
identify tests that exercise this target.
{/param}
{/call}
{/template}
/***/
{template .tests_apple_arg}
{call buck.arg}
{param name : 'tests' /}
{param default : '[]' /}
{param desc}
List of <a href="{ROOT}concept/build_target.html">build targets</a> that
identify the test rules that exercise this target. Note that
non <a href="{ROOT}rule/apple_test.html"><code>apple_test</code></a> targets
will not be included in generated projects due to Xcode's limitations but will still work
with <a href="{ROOT}command/test.html"><code>buck test</code></a>.
{/param}
{/call}
{/template}
/***/
{template .test_label_arg}
{call buck.arg}
{param name: 'labels' /}
{param default: '[]' /}
{param desc}
A list of labels to be applied to these tests. These labels are
arbitrary text strings and have no meaning within buck itself. They
can, however, have meaning for you as a test author
(e.g., <code>smoke</code> or <code>fast</code>). A label can be
used to filter or include a specific test rule
when executing <a href="{ROOT}command/test.html"><code>buck
test</code></a>.
{/param}
{/call}
{/template}
/***/
{template .run_test_separately_arg}
{call buck.arg}
{param name: 'run_test_separately' /}
{param default : 'False' /}
{param desc}
If set to <code>True</code>, the test(s) in this rule are run separately
from all other tests. (This is useful
for integration tests which access a physical device or other limited
resource.)
<p>If unset, the test(s) in this rule in parallel with all other tests.</p>
{/param}
{/call}
{/template}
/***/
{template .fork_mode}
{call buck.arg}
{param name: 'fork_mode' /}
{param default : 'None' /}
{param desc}
Controls whether tests will all be run in the same process or a process will be
started for each set of tests in a class.
(This is mainly useful when porting Java tests to Buck from Apache Ant which
allows JUnit tasks to set a <code>fork="yes"</code> property. It should not be
used for new tests since it encourages tests to not cleanup after themselves and
increases the tests' computational resources and running time.)
<dl>
<dt><code>none</code></dt>
<dd>All tests will run in the same process.</dd>
<dt><code>per_test</code></dt>
<dd>A process will be started for each test class in which all tests of that test class
will run.</dd>
</dl>
{/param}
{/call}
{/template}
/***/
{template .test_rule_timeout_ms}
{call buck.arg}
{param name: 'test_rule_timeout_ms' /}
{param default: 'None' /}
{param desc}
If set specifies the maximum amount of time (in milliseconds) in which all of the tests in this
rule should complete. This overrides the default <code>rule_timeout</code> if any has been
specified in {call buckconfig.test_rule_timeout /}.
{/param}
{/call}
{/template}
/**
* @param? withAlias
* @param? isWindows
*/
{template .installationInstructions}
{literal}<pre>
git clone https://github.com/facebook/buck.git
cd buck
ant{/literal}
{if $withAlias and not $isWindows}
sudo ln -s ${lb}PWD{rb}/bin/buck /usr/bin/buck
{elseif not $isWindows}
{literal}
./bin/buck build --show-output buck
buck-out/gen/programs/buck.pex --help
{/literal}
{else}
{literal}
.\bin\buck build --show-output buck
buck-out\gen\programs\buck.pex --help
{/literal}
{/if}
</pre>
{/template}
/**
* @param newURL
*/
{template .redirectTo}
<!DOCTYPE html>
<meta charset="utf-8">
<title>Redirecting...</title>
<link rel=canonical href="{$newURL}">
<meta http-equiv=refresh content="0; url={$newURL}">
<h1>Redirecting...</h1>
<a href="{$newURL}">Click here if you are not redirected.</a>
<script>location="{$newURL}"</script>
{/template}