From 3c8862763bac9a86de309ff33c72f7e168c8f52d Mon Sep 17 00:00:00 2001
From: str4d <str4d@mail.i2p>
Date: Wed, 25 Jun 2014 02:04:06 +0000
Subject: [PATCH] Gradle build scripts for remaining apps

---
 apps/addressbook/build.gradle | 18 ++++++++++++++++++
 apps/i2psnark/build.gradle    | 26 ++++++++++++++++++++++++++
 apps/i2ptunnel/build.gradle   | 27 +++++++++++++++++++++++++++
 apps/susidns/build.gradle     | 20 ++++++++++++++++++++
 apps/susimail/build.gradle    | 27 +++++++++++++++++++++++++++
 settings.gradle               |  2 +-
 6 files changed, 119 insertions(+), 1 deletion(-)
 create mode 100644 apps/addressbook/build.gradle
 create mode 100644 apps/i2psnark/build.gradle
 create mode 100644 apps/i2ptunnel/build.gradle
 create mode 100644 apps/susidns/build.gradle
 create mode 100644 apps/susimail/build.gradle

diff --git a/apps/addressbook/build.gradle b/apps/addressbook/build.gradle
new file mode 100644
index 0000000000..72c4e6f483
--- /dev/null
+++ b/apps/addressbook/build.gradle
@@ -0,0 +1,18 @@
+apply plugin: 'war'
+
+sourceSets {
+    main {
+        java {
+            srcDir 'java/src'
+        }
+    }
+}
+
+dependencies {
+    compile project(':core')
+    providedCompile project(':apps:jetty')
+}
+
+war {
+    webXml = file('web.xml')
+}
diff --git a/apps/i2psnark/build.gradle b/apps/i2psnark/build.gradle
new file mode 100644
index 0000000000..15c3fbec8b
--- /dev/null
+++ b/apps/i2psnark/build.gradle
@@ -0,0 +1,26 @@
+apply plugin: 'war'
+
+sourceSets {
+    main {
+        java {
+            srcDir 'java/src'
+        }
+    }
+}
+
+dependencies {
+    compile project(':core')
+    providedCompile project(':apps:ministreaming')
+    providedCompile project(':apps:jetty')
+}
+
+war {
+    into '.icons', {
+        from 'icons'
+    }
+    webInf {
+        into 'classes/org/klomp/snark/web'
+        from 'mime.properties'
+    }
+    webXml = file('web.xml')
+}
diff --git a/apps/i2ptunnel/build.gradle b/apps/i2ptunnel/build.gradle
new file mode 100644
index 0000000000..1b5dde3ba8
--- /dev/null
+++ b/apps/i2ptunnel/build.gradle
@@ -0,0 +1,27 @@
+apply plugin: 'war'
+
+sourceSets {
+    main {
+        java {
+            srcDir 'java/src'
+        }
+    }
+    test {
+        java {
+            srcDir 'java/test/junit'
+        }
+    }
+}
+
+dependencies {
+    compile project(':core')
+    providedCompile project(':apps:ministreaming')
+    providedCompile project(':apps:jetty')
+    testCompile 'junit:junit:4.+'
+}
+
+war {
+    from 'jsp'
+    exclude 'jsp/web.xml'
+    webXml = file('jsp/web.xml')
+}
diff --git a/apps/susidns/build.gradle b/apps/susidns/build.gradle
new file mode 100644
index 0000000000..103163af72
--- /dev/null
+++ b/apps/susidns/build.gradle
@@ -0,0 +1,20 @@
+apply plugin: 'war'
+
+sourceSets {
+    main {
+        java {
+            srcDir 'src/java/src'
+        }
+    }
+}
+
+dependencies {
+    compile project(':core')
+    providedCompile project(':apps:jetty')
+}
+
+war {
+    from 'src/jsp'
+    from 'src/index.html'
+    webXml = file('src/WEB-INF/web-template.xml')
+}
diff --git a/apps/susimail/build.gradle b/apps/susimail/build.gradle
new file mode 100644
index 0000000000..7cb5787fc5
--- /dev/null
+++ b/apps/susimail/build.gradle
@@ -0,0 +1,27 @@
+apply plugin: 'war'
+
+sourceSets {
+    main {
+        java {
+            srcDir 'src/src'
+        }
+    }
+}
+
+dependencies {
+    compile project(':core')
+    providedCompile project(':apps:jetty')
+}
+
+war {
+    from 'src'
+    exclude 'WEB-INF/web.xml'
+    exclude 'LICENSE'
+    exclude 'src'
+    exclude 'susimail.properties'
+    webInf {
+        into 'classes'
+        from 'src/susimail.properties'
+    }
+    webXml = file('src/WEB-INF/web.xml')
+}
diff --git a/settings.gradle b/settings.gradle
index f581786b22..9138c7c502 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1 @@
-include 'core', 'router', 'installer', 'apps:ministreaming', 'apps:streaming', 'apps:desktopgui', 'apps:systray', 'apps:jetty', 'apps:routerconsole', 'apps:BOB', 'apps:sam'
+include 'core', 'router', 'installer', 'apps:ministreaming', 'apps:streaming', 'apps:desktopgui', 'apps:systray', 'apps:jetty', 'apps:routerconsole', 'apps:addressbook', 'apps:susidns', 'apps:susimail', 'apps:i2psnark', 'apps:i2ptunnel', 'apps:BOB', 'apps:sam'
-- 
GitLab