blob: cfa70f2c362e68d0fc7dde18ba23ed3230205878 [file] [log] [blame]
{namespace buck.android_library}
{template .soyweb}
{param title: 'android_library()' /}
{param prettify: true /}
{param content}
{call buck.rule}
{param overview}
An <code>android_library()</code> rule is used to define a set of Java files
that can be compiled together against the Android SDK. The main output of an
{sp}<code>android_library()</code> rule is a single JAR file containing all of the
compiled class files and resources.
{param args}
{call buck.arg}
{param name: 'name' /}
{param desc}
The name of the rule.
{call buck.arg}
{param name: 'srcs' /}
{param default : '[]' /}
{param desc}
The set of <code>.java</code> files to compile for this rule.
{call buck.arg}
{param name: 'resources' /}
{param default : '[]' /}
{param desc}
Static files to include among the compiled <code>.class</code>
{sp}files. These files can be loaded via <a
<strong>Note:</strong> Buck uses the <code>src_roots</code> property in
{sp}<a href="{ROOT}concept/buckconfig.html"><code>buckconfig.html</code></a>
{sp}to help determine where resources should be placed within the generated JAR file.
{call buck.arg}
{param name: 'deps' /}
{param default : '[]' /}
{param desc}
Rules (usually other <code>android_library</code> rules)
that are used to generate the classpath required to compile this
{call buck.visibility_arg /}
{/param} // args
{param examples}
An <code>android_library</code> rule used in concert with an
{sp}{call buck.android_resource /} rule.
This would be a common arrangement for a standard Android Library project
as defined by
<a href=""></a>
{literal}<pre class="prettyprint lang-py">
name = 'res',
res = 'res',
package = 'com.example',
name = 'my_library',
srcs = glob(['src/**/*.java']),
deps = [
{/param} // examples
{/call} // buck.rule
{/param} // content
{/call} //