blob: d550520fd338fc5a0eb14d350eace7fbbb41128b [file] [log] [blame]
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 prebuilt_jar}
/***/
{template .soyweb}
{call buck.page}
{param title: 'prebuilt_jar()' /}
{param navid: 'rule_prebuilt_jar' /}
{param prettify: true /}
{param description}
A rule that is used to identify a JAR file that is checked into the
project as a precompiled binary.
{/param}
{param content}
{call buck.rule}
{param status: 'FROZEN' /}
{param overview}
A <code>prebuilt_jar()</code> rule is used to identify a JAR file that
is checked into our repository as a precompiled binary rather than one
that is built from source by Buck. Frequently, these are used to
reference third-party JAR files (such as </code>junit.jar</code>) and
are used as dependencies of <a
href="java_library.html"><code>java_library()</code></a> rules.
{/param}
{param args}
{call buck.name_arg /}
{call buck.arg}
{param name: 'binary_jar' /}
{param desc}
Path to the pre-built JAR file.
{/param}
{/call}
{call buck.arg}
{param name: 'source_jar' /}
{param default : 'None' /}
{param desc}
Path to a JAR file that contains the <code>.java</code> files to create
the <code>.class</code> in the <code>binary_jar</code>. This is frequently
provided for debugging purposes.
{/param}
{/call}
{call buck.arg}
{param name: 'javadoc_url' /}
{param default : 'None' /}
{param desc}
URL to the Javadoc for the <code>.class</code> files in the
{sp}<code>binary_jar</code>.
{/param}
{/call}
{call buck.arg}
{param name: 'deps' /}
{param default : '[]' /}
{param desc}
Rules that must be built before this rule. Because the
{sp}<code>binary_jar</code> is already built, there should be nothing to
build, so this should be empty.
{/param}
{/call}
{/param} // close args
{param examples}
{literal}<pre class="prettyprint lang-py">
prebuilt_jar(
name = 'junit',
binary_jar = 'junit-4.8.2.jar',
source_jar = 'junit-4.8.2-sources.jar',
javadoc_url = 'http://kentbeck.github.com/junit/javadoc/4.8/',
)
java_library(
name = 'tests',
srcs = glob(['tests/**/*Test.java']),
deps = [
':junit',
],
)
</pre>{/literal}
{/param}
{/call} // close buck.rule
{/param}
{/call}
{/template}