diff --git a/apps/i2psnark/build.gradle b/apps/i2psnark/build.gradle index b9f7037d109bf78ecd5e060c89bd782d99263830..ba6681ed6e77f83d77af732752cbcdc84bcd37c3 100644 --- a/apps/i2psnark/build.gradle +++ b/apps/i2psnark/build.gradle @@ -6,6 +6,7 @@ sourceSets { main { java { srcDir 'java/src' + srcDir 'java/build/messages-src' } } } @@ -34,6 +35,16 @@ artifacts { archives i2psnarkJar } +// Create the java files from the po files. The jar task will compile them. +// This requires gettext 0.19 or higher. +// We don't support the "slow way" +task bundle { + doLast { + println "apps/i2psnark/java/bundle-messages.sh".execute().text + } +} +war.dependsOn bundle + war { rootSpec.exclude('/org/klomp/snark/*.class') rootSpec.exclude('/org/klomp/snark/bencode/**') diff --git a/apps/i2psnark/java/bundle-messages.sh b/apps/i2psnark/java/bundle-messages.sh index bcb4268cf8f5d7b82d340101a001ed24f33dca66..4f5546639f3b8048e4f3ceafcb3c4c1a6391b177 100755 --- a/apps/i2psnark/java/bundle-messages.sh +++ b/apps/i2psnark/java/bundle-messages.sh @@ -10,6 +10,7 @@ # # zzz - public domain # +cd `dirname $0` CLASS=org.klomp.snark.web.messages TMPFILE=build/javafiles.txt export TZ=UTC diff --git a/apps/i2ptunnel/build.gradle b/apps/i2ptunnel/build.gradle index 5dc1d89d19f83f2d9b3dad4c61d937a101940e38..3cf07f59d321528edc3e97d0e779e0208c636ba7 100644 --- a/apps/i2ptunnel/build.gradle +++ b/apps/i2ptunnel/build.gradle @@ -6,6 +6,7 @@ sourceSets { main { java { srcDir 'java/src' + srcDir 'java/build/messages-src' srcDir 'java/build/messages-proxy-src' } } @@ -32,8 +33,15 @@ task bundleProxy { } } +task bundle { + doLast { + println "apps/i2ptunnel/java/bundle-messages.sh".execute().text + } +} + task i2ptunnelJar(type: Jar) { from sourceSets.main.output + exclude '**/web/*.class' exclude '**/ui/*.class' exclude '**/EditBean.class' exclude '**/IndexBean.class' @@ -53,7 +61,9 @@ task i2ptunnelJar(type: Jar) { }) } i2ptunnelJar.dependsOn bundleProxy +war.dependsOn bundle +// not needed unless we're building for both android and regular task tempBeansJar(type: Jar) { from sourceSets.main.output include '**/EditBean.class' @@ -62,6 +72,7 @@ task tempBeansJar(type: Jar) { baseName = 'temp-beans' } +// only for android task uiJar(type: Jar) { baseName = 'i2ptunnel-ui' from sourceSets.main.output @@ -72,15 +83,19 @@ task uiJar(type: Jar) { } artifacts { - archives i2ptunnelJar, tempBeansJar, uiJar + archives i2ptunnelJar //, tempBeansJar, uiJar } war { + include '**/EditBean.class' + include '**/ui/*.class' + include '**/IndexBean.class' from 'jsp' rootSpec.exclude('/net/i2p/i2ptunnel/*.class') rootSpec.exclude('/net/i2p/i2ptunnel/access') rootSpec.exclude('/net/i2p/i2ptunnel/irc') rootSpec.exclude('/net/i2p/i2ptunnel/localServer') + rootSpec.exclude('/net/i2p/i2ptunnel/proxy') rootSpec.exclude('/net/i2p/i2ptunnel/socks') rootSpec.exclude('/net/i2p/i2ptunnel/streamr') rootSpec.exclude('/net/i2p/i2ptunnel/udp') diff --git a/apps/routerconsole/build.gradle b/apps/routerconsole/build.gradle index af6eeb7c6ba64dafbfa4205cfd6e1b7df9e53f7e..f6310d0d3d31a6a4d39cd27600dee6b817a60c49 100644 --- a/apps/routerconsole/build.gradle +++ b/apps/routerconsole/build.gradle @@ -7,6 +7,7 @@ sourceSets { main { java { srcDir 'java/src' + srcDir 'java/build/messages-src' srcDir 'java/build/messages-countries-src' srcDir 'java/build/messages-news-src' } @@ -51,6 +52,11 @@ task bundleJar { println "apps/routerconsole/java/bundle-messages-news.sh".execute().text } } +task bundle { + doLast { + println "apps/routerconsole/java/bundle-messages.sh".execute().text + } +} task consoleJar(type: Jar) { from sourceSets.main.output @@ -69,6 +75,7 @@ task consoleJar(type: Jar) { }) } consoleJar.dependsOn bundleJar +war.dependsOn bundle artifacts { archives consoleJar diff --git a/apps/susidns/build.gradle b/apps/susidns/build.gradle index e960b28f0197aedda11522aad15cd0dbbe867e68..3b1f18c5438b7bb330ed6d928a5c61019a34964f 100644 --- a/apps/susidns/build.gradle +++ b/apps/susidns/build.gradle @@ -6,6 +6,7 @@ sourceSets { main { java { srcDir 'src/java/src' + srcDir 'src/build/messages-src' } } } @@ -15,6 +16,16 @@ dependencies { providedCompile project(':apps:jetty') } +// Create the java files from the po files. The jar task will compile them. +// This requires gettext 0.19 or higher. +// We don't support the "slow way" +task bundle { + doLast { + println "apps/susidns/src/bundle-messages.sh".execute().text + } +} +war.dependsOn bundle + war { from 'src/jsp' from 'src/index.html' diff --git a/apps/susidns/src/bundle-messages.sh b/apps/susidns/src/bundle-messages.sh index a35e32aa42c923f11db67566ecefedd3b4577058..40eb9f4061a0eefe2b078848d1918f1de0cb64f9 100755 --- a/apps/susidns/src/bundle-messages.sh +++ b/apps/susidns/src/bundle-messages.sh @@ -10,6 +10,7 @@ # # zzz - public domain # +cd `dirname $0` CLASS=i2p.susi.dns.messages TMPFILE=tmp/javafiles.txt export TZ=UTC diff --git a/apps/susimail/build.gradle b/apps/susimail/build.gradle index fac1d6906046e6d2ec5ef458ee28e08ecf620043..9ec84cd358d0752713f62088570c08e35c7fb35f 100644 --- a/apps/susimail/build.gradle +++ b/apps/susimail/build.gradle @@ -6,6 +6,7 @@ sourceSets { main { java { srcDir 'src/src' + srcDir 'build/messages-src' } } } @@ -15,6 +16,16 @@ dependencies { providedCompile project(':apps:jetty') } +// Create the java files from the po files. The jar task will compile them. +// This requires gettext 0.19 or higher. +// We don't support the "slow way" +task bundle { + doLast { + println "apps/susimail/bundle-messages.sh".execute().text + } +} +war.dependsOn bundle + war { from 'src' exclude 'WEB-INF/web.xml' diff --git a/apps/susimail/bundle-messages.sh b/apps/susimail/bundle-messages.sh index d939f8c6852b17bc7f9017b23e286fb5db26ab02..6733c370b3f4eed7e27d2dde74d1da1128b9a27a 100755 --- a/apps/susimail/bundle-messages.sh +++ b/apps/susimail/bundle-messages.sh @@ -10,6 +10,7 @@ # # zzz - public domain # +cd `dirname $0` CLASS=i2p.susi.webmail.messages TMPFILE=javafiles.txt export TZ=UTC