xref: /JGit/tools/default.defs (revision 13502fef8f4814c6c5bdfa63674c94f9d32b5531)
1def java_sources(
2    name,
3    srcs,
4    visibility = ['PUBLIC']
5  ):
6  java_library(
7    name = name,
8    resources = srcs,
9    visibility = visibility,
10  )
11
12def maven_jar(
13    name,
14    group,
15    artifact,
16    version,
17    bin_sha1,
18    src_sha1,
19    visibility = ['PUBLIC']):
20  jar_name = '%s__jar' % name
21  src_name = '%s__src' % name
22
23  remote_file(
24    name = jar_name,
25    sha1 = bin_sha1,
26    url = 'mvn:%s:%s:jar:%s' % (group, artifact, version),
27    out = '%s.jar' % jar_name,
28  )
29
30  remote_file(
31    name = src_name,
32    sha1 = src_sha1,
33    url = 'mvn:%s:%s:src:%s' % (group, artifact, version),
34    out = '%s.jar' % src_name,
35  )
36
37  prebuilt_jar(
38    name = name,
39    binary_jar = ':' + jar_name,
40    source_jar = ':' + src_name,
41    visibility = visibility)
42
43