--- /dev/null
+[buildfile]
+ includes = //tools/default.defs
+
+[java]
+ src_roots = src, resources
+
+[project]
+ ignore = .git
+
+[cache]
+ mode = dir
+
+[download]
+ maven_repo = http://repo1.maven.org/maven2
+ in_build = true
/target
/.project
+/buck-cache
+/buck-out
--- /dev/null
+java_library(
+ name = 'jgit',
+ exported_deps = ['//org.eclipse.jgit:jgit'],
+ visibility = ['PUBLIC'],
+)
+
+java_library(
+ name = 'jgit_src',
+ exported_deps = ['//org.eclipse.jgit:jgit_src'],
+ visibility = ['PUBLIC'],
+)
+
+java_library(
+ name = 'jgit-servlet',
+ exported_deps = [
+ ':jgit',
+ '//org.eclipse.jgit.http.server:jgit-servlet'
+ ],
+ visibility = ['PUBLIC'],
+)
+
+java_library(
+ name = 'jgit-archive',
+ exported_deps = [
+ ':jgit',
+ '//org.eclipse.jgit.archive:jgit-archive'
+ ],
+ visibility = ['PUBLIC'],
+)
+
+java_library(
+ name = 'junit',
+ exported_deps = [
+ ':jgit',
+ '//org.eclipse.jgit.junit:junit'
+ ],
+ visibility = ['PUBLIC'],
+)
--- /dev/null
+maven_jar(
+ name = 'jsch',
+ bin_sha1 = '658b682d5c817b27ae795637dfec047c63d29935',
+ src_sha1 = '791359d94d6edcace686a56d0727ee093a2f7c33',
+ group = 'com.jcraft',
+ artifact = 'jsch',
+ version = '0.1.53',
+)
+
+maven_jar(
+ name = 'javaewah',
+ bin_sha1 = 'eceaf316a8faf0e794296ebe158ae110c7d72a5a',
+ src_sha1 = 'a50d78eb630e05439461f3130b94b3bcd1ea6f03',
+ group = 'com.googlecode.javaewah',
+ artifact = 'JavaEWAH',
+ version = '0.7.9',
+)
+
+maven_jar(
+ name = 'httpcomponents',
+ bin_sha1 = '4c47155e3e6c9a41a28db36680b828ced53b8af4',
+ src_sha1 = 'af4d76be0c46ee26b0d9d1d4a34d244a633cac84',
+ group = 'org.apache.httpcomponents',
+ artifact = 'httpclient',
+ version = '4.3.6',
+)
+
+maven_jar(
+ name = 'slf4j-api',
+ bin_sha1 = '0081d61b7f33ebeab314e07de0cc596f8e858d97',
+ src_sha1 = '58d38f68d4a867d4552ae27960bb348d7eaa1297',
+ group = 'org.slf4j',
+ artifact = 'slf4j-api',
+ version = '1.7.2',
+)
+
+maven_jar(
+ name = 'servlet-api',
+ bin_sha1 = '3cd63d075497751784b2fa84be59432f4905bf7c',
+ src_sha1 = 'ab3976d4574c48d22dc1abf6a9e8bd0fdf928223',
+ group = 'javax.servlet',
+ artifact = 'javax.servlet-api',
+ version = '3.1.0',
+)
+
+maven_jar(
+ name = 'commons-compress',
+ bin_sha1 = 'c7d9b580aff9e9f1998361f16578e63e5c064699',
+ src_sha1 = '396b81bdfd0fb617178e1707ef64832215307c78',
+ group = 'org.apache.commons',
+ artifact = 'commons-compress',
+ version = '1.6',
+)
+
+maven_jar(
+ name = 'junit',
+ bin_sha1 = '4e031bb61df09069aeb2bffb4019e7a5034a4ee0',
+ src_sha1 = '28e0ad201304e4a4abf999ca0570b7cffc352c3c',
+ group = 'junit',
+ artifact = 'junit',
+ version = '4.11',
+)
--- /dev/null
+java_library(
+ name = 'jgit-archive',
+ srcs = glob(
+ ['src/**'],
+ excludes = ['src/org/eclipse/jgit/archive/FormatActivator.java'],
+ ),
+ resources = glob(['resources/**']),
+ provided_deps = [
+ '//org.eclipse.jgit:jgit',
+ '//lib:commons-compress',
+ ],
+ visibility = ['PUBLIC'],
+)
--- /dev/null
+java_library(
+ name = 'jgit-servlet',
+ srcs = glob(['src/**']),
+ resources = glob(['resources/**']),
+ provided_deps = [
+ '//org.eclipse.jgit:jgit',
+ '//lib:servlet-api',
+ ],
+ visibility = ['PUBLIC'],
+)
--- /dev/null
+java_library(
+ name = 'junit',
+ srcs = glob(['src/**']),
+ resources = glob(['resources/**']),
+ provided_deps = [
+ '//org.eclipse.jgit:jgit',
+ '//lib:junit',
+ ],
+ visibility = ['PUBLIC'],
+)
--- /dev/null
+SRCS = glob(['src/**'])
+RESOURCES = glob(['resources/**'])
+
+java_library(
+ name = 'jgit',
+ srcs = SRCS,
+ resources = RESOURCES,
+ deps = [
+ '//lib:javaewah',
+ '//lib:jsch',
+ '//lib:httpcomponents',
+ '//lib:slf4j-api',
+ ],
+ visibility = ['PUBLIC'],
+)
+
+java_sources(
+ name = 'jgit_src',
+ srcs = SRCS + RESOURCES,
+)
--- /dev/null
+def java_sources(
+ name,
+ srcs,
+ visibility = ['PUBLIC']
+ ):
+ java_library(
+ name = name,
+ resources = srcs,
+ visibility = visibility,
+ )
+
+def maven_jar(
+ name,
+ group,
+ artifact,
+ version,
+ bin_sha1,
+ src_sha1,
+ visibility = ['PUBLIC']):
+ jar_name = '%s__jar' % name
+ src_name = '%s__src' % name
+
+ remote_file(
+ name = jar_name,
+ sha1 = bin_sha1,
+ url = 'mvn:%s:%s:jar:%s' % (group, artifact, version),
+ out = '%s.jar' % jar_name,
+ )
+
+ remote_file(
+ name = src_name,
+ sha1 = src_sha1,
+ url = 'mvn:%s:%s:src:%s' % (group, artifact, version),
+ out = '%s.jar' % src_name,
+ )
+
+ prebuilt_jar(
+ name = name,
+ binary_jar = ':' + jar_name,
+ source_jar = ':' + src_name,
+ visibility = visibility)
+