Implement BUCK build
As this plugin is mentioned in the gerrit docs, implement BUCK
build.
Adjusted gerrit api version to 2.12 for out-of-tree build.
Change-Id: Ie91172cf9a6bf2874654efb5bb42ece70e751060
diff --git a/BUCK b/BUCK
new file mode 100644
index 0000000..34e5f63
--- /dev/null
+++ b/BUCK
@@ -0,0 +1,19 @@
+include_defs('//bucklets/gerrit_plugin.bucklet')
+
+gerrit_plugin(
+ name = 'project-download-commands',
+ srcs = glob(['src/main/java/**/*.java']),
+ resources = glob(['src/main/resources/**/*']),
+ manifest_entries = [
+ 'Gerrit-PluginName: project-download-commands',
+ 'Gerrit-Module: com.googlesource.gerrit.plugins.download.command.project.Module',
+ 'Implementation-Title: Project download command plugin',
+ 'Implementation-URL: https://gerrit-review.googlesource.com/#/admin/projects/plugins/project-download-commands',
+ ]
+)
+# this is required for bucklets/tools/eclipse/project.py to work
+java_library(
+ name = 'classpath',
+ deps = [':project-download-commands__plugin'],
+)
+
diff --git a/lib/gerrit/BUCK b/lib/gerrit/BUCK
new file mode 100644
index 0000000..0a0b2bc
--- /dev/null
+++ b/lib/gerrit/BUCK
@@ -0,0 +1,13 @@
+include_defs('//bucklets/maven_jar.bucklet')
+
+VER = '2.12'
+REPO = MAVEN_CENTRAL
+
+maven_jar(
+ name = 'plugin-api',
+ id = 'com.google.gerrit:gerrit-plugin-api:' + VER,
+ sha1 = '8ce1f6e65078bbcf03a1758f96b3ebca19b7fe3c',
+ license = 'Apache2.0',
+ attach_source = False,
+ repository = REPO,
+)