Build: Add translations to gradle build (part 2 - wars)

Several fixes for i2ptunnel gradle build
This commit is contained in:
zzz
2021-01-03 09:55:42 -05:00
parent 888311e34f
commit 152ad1659b
8 changed files with 59 additions and 1 deletions

View File

@@ -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/**')

View File

@@ -10,6 +10,7 @@
#
# zzz - public domain
#
cd `dirname $0`
CLASS=org.klomp.snark.web.messages
TMPFILE=build/javafiles.txt
export TZ=UTC

View File

@@ -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')

View File

@@ -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

View File

@@ -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'

View File

@@ -10,6 +10,7 @@
#
# zzz - public domain
#
cd `dirname $0`
CLASS=i2p.susi.dns.messages
TMPFILE=tmp/javafiles.txt
export TZ=UTC

View File

@@ -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'

View File

@@ -10,6 +10,7 @@
#
# zzz - public domain
#
cd `dirname $0`
CLASS=i2p.susi.webmail.messages
TMPFILE=javafiles.txt
export TZ=UTC