Fix standalone Buck build

The standalone Buck build failed because of missing dependency to gson
and log4j.

Change-Id: Ia55784d86e0fb659d658fb66aa4c5fc258bd7c41
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
diff --git a/BUCK b/BUCK
index 7d21481..43b51f9 100644
--- a/BUCK
+++ b/BUCK
@@ -1,5 +1,12 @@
 include_defs('//bucklets/gerrit_plugin.bucklet')
 
+if STANDALONE_MODE:
+  GSON = '//lib/gson:gson'
+  LOG4J = '//lib/log:log4j'
+else:
+  GSON = '//plugins/delete-project/lib/gson:gson'
+  LOG4J = '//plugins/delete-project/lib/log:log4j'
+
 gerrit_plugin(
   name = 'delete-project',
   srcs = glob(['src/main/java/**/*.java']),
@@ -11,8 +18,8 @@
     'Gerrit-SshModule: com.googlesource.gerrit.plugins.deleteproject.SshModule',
   ],
   provided_deps = [
-    '//lib/log:log4j',
-    '//lib:gson',
+    LOG4J,
+    GSON,
   ],
 )
 
diff --git a/lib/gson/BUCK b/lib/gson/BUCK
new file mode 100644
index 0000000..8892994
--- /dev/null
+++ b/lib/gson/BUCK
@@ -0,0 +1,8 @@
+include_defs('//bucklets/maven_jar.bucklet')
+
+maven_jar(
+  name = 'gson',
+  id = 'com.google.code.gson:gson:2.1',
+  sha1 = '2e66da15851f9f5b5079228f856c2f090ba98c38',
+  license = 'Apache2.0',
+)
diff --git a/lib/log/BUCK b/lib/log/BUCK
new file mode 100644
index 0000000..17e606b
--- /dev/null
+++ b/lib/log/BUCK
@@ -0,0 +1,16 @@
+include_defs('//bucklets/maven_jar.bucklet')
+
+maven_jar(
+  name = 'jcl-over-slf4j',
+  id = 'org.slf4j:jcl-over-slf4j:1.7.7',
+  sha1 = '56003dcd0a31deea6391b9e2ef2f2dc90b205a92',
+  license = 'slf4j',
+)
+
+maven_jar(
+  name = 'log4j',
+  id = 'log4j:log4j:1.2.17',
+  sha1 = '5af35056b4d257e4b64b9e8069c0746e8b08629f',
+  license = 'Apache2.0',
+  exclude = ['META-INF/LICENSE', 'META-INF/NOTICE'],
+)