6546085df7
Using existing download_file.py from custom maven_jar Skylark rule gives us the following advantages: * fetching of sources (needed for GWT JSNI build and IDE integration) * server support for proxies * global, per-user cache of artifacts * support for local maven repository (~/.m2) Change-Id: Ic246dd9298775a6819f05453c601c688d8cb7ab9
67 lines
1.4 KiB
Python
67 lines
1.4 KiB
Python
load('//tools/bzl:genrule2.bzl', 'genrule2')
|
|
load('//tools/bzl:gwt.bzl', 'gwt_module')
|
|
|
|
SRC = 'src/main/java/org/eclipse/jgit/'
|
|
|
|
gwt_module(
|
|
name = 'client',
|
|
srcs = [
|
|
SRC + 'diff/Edit_JsonSerializer.java',
|
|
SRC + 'diff/ReplaceEdit.java',
|
|
],
|
|
gwt_xml = SRC + 'JGit.gwt.xml',
|
|
deps = [
|
|
':Edit',
|
|
'//lib/gwt:user',
|
|
'//lib:gwtjsonrpc',
|
|
],
|
|
visibility = ['//visibility:public'],
|
|
)
|
|
|
|
gwt_module(
|
|
name = 'Edit',
|
|
srcs = [':jgit_edit_src'],
|
|
visibility = ['//visibility:public'],
|
|
)
|
|
|
|
genrule2(
|
|
name = 'jgit_edit_src',
|
|
cmd = ' && '.join([
|
|
'unzip -qd $$TMP $(location @jgit//src) ' +
|
|
'org/eclipse/jgit/diff/Edit.java',
|
|
'cd $$TMP',
|
|
'zip -Dq $$ROOT/$@ org/eclipse/jgit/diff/Edit.java',
|
|
]),
|
|
tools = ['@jgit//src'],
|
|
outs = [ 'edit.srcjar' ],
|
|
)
|
|
|
|
java_library(
|
|
name = 'server',
|
|
srcs = [
|
|
SRC + x for x in [
|
|
'diff/EditDeserializer.java',
|
|
'diff/ReplaceEdit.java',
|
|
'internal/storage/file/WindowCacheStatAccessor.java',
|
|
'lib/ObjectIdSerialization.java',
|
|
]
|
|
],
|
|
deps = [
|
|
'//lib:gson',
|
|
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
],
|
|
visibility = ['//visibility:public'],
|
|
)
|
|
|
|
java_test(
|
|
name = 'jgit_patch_tests',
|
|
test_class = 'org.eclipse.jgit.diff.EditDeserializerTest',
|
|
srcs = glob(['src/test/java/**/*.java']),
|
|
deps = [
|
|
':server',
|
|
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
'//lib:junit',
|
|
],
|
|
visibility = ['//visibility:public'],
|
|
)
|