Merge "Implement buck driven build"
diff --git a/BUCK b/BUCK
new file mode 100644
index 0000000..600cf13
--- /dev/null
+++ b/BUCK
@@ -0,0 +1,38 @@
+gerrit_plugin(
+ name = 'its-rtc',
+ srcs = glob(['src/main/java/**/*.java']),
+ resources = glob(['src/main/resources/**/*']),
+ manifest_entries = [
+ 'Gerrit-PluginName: its-rtc',
+ 'Gerrit-Module: com.googlesource.gerrit.plugins.hooks.rtc.RTCModule',
+ 'Gerrit-InitStep: com.googlesource.gerrit.plugins.hooks.rtc.InitRTC',
+ 'Gerrit-ReloadMode: reload',
+ 'Implementation-Title: Plugin its-rtc',
+ 'Implementation-URL: http://www.gerritforge.com',
+ 'Implementation-Vendor: GerritForge LLP',
+ ],
+ deps = [
+ '//plugins/its-base:its-base__plugin',
+ '//plugins/its-rtc/lib:commons-logging',
+ ],
+ provided_deps = [
+ '//lib:gson',
+ '//lib/commons:codec',
+ '//lib/commons:httpclient',
+ '//lib/commons:httpcore',
+ '//lib/commons:io',
+ ],
+)
+
+java_test(
+ name = 'its-rtc_tests',
+ srcs = glob(['src/test/java/**/*.java']),
+ labels = ['its-rtc'],
+ source_under_test = [':its-rtc__plugin'],
+ deps = [
+ ':its-rtc__plugin',
+ '//gerrit-plugin-api:lib',
+ '//lib:junit',
+ '//plugins/its-rtc/lib:mockito',
+ ],
+)
diff --git a/lib/BUCK b/lib/BUCK
new file mode 100644
index 0000000..a197b1b
--- /dev/null
+++ b/lib/BUCK
@@ -0,0 +1,15 @@
+include_defs('//lib/maven.defs')
+
+maven_jar(
+ name = 'commons-logging',
+ id = 'commons-logging:commons-logging:1.2',
+ sha1 = '4bfc12adfe4842bf07b657f0369c4cb522955686',
+ license = 'Apache2.0',
+)
+
+maven_jar(
+ name = 'mockito',
+ id = 'org.mockito:mockito-all:1.9.5',
+ sha1 = '79a8984096fc6591c1e3690e07d41be506356fa5',
+ license = 'Apache2.0',
+)
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
new file mode 100644
index 0000000..c537f5f
--- /dev/null
+++ b/src/main/resources/Documentation/build.md
@@ -0,0 +1,50 @@
+Build
+=====
+
+This @PLUGIN@ plugin is built with Buck.
+
+Clone (or link) both this plugin and also
+[plugins/its-base](https://gerrit-review.googlesource.com/#/admin/projects/plugins/its-base)
+to the `plugins` directory of Gerrit's source tree.
+
+Then issue
+
+```
+ buck build plugins/@PLUGIN@
+```
+
+in the root of Gerrit's source tree to build
+
+The output is created in
+
+```
+ buck-out/gen/plugins/@PLUGIN@/@PLUGIN@.jar
+```
+
+This project can be imported into the Eclipse IDE:
+
+```
+ ./tools/eclipse/project.py
+```
+
+To execute the tests run:
+
+```
+ buck test --all --include @PLUGIN@
+```
+
+Note that for compatibility reasons a Maven build is provided, but is
+considered to be deprecated and will be removed in a future version of
+this plugin.
+
+To build with Maven, change directory to the plugin folder and issue the
+command:
+
+```
+ mvn clean package
+```
+
+When building with Maven, the Gerrit Plugin API must be available.
+
+How to build the Gerrit Plugin API is described in the [Gerrit
+documentation](../../../Documentation/dev-buck.html#_extension_and_plugin_api_jar_files).