Build: Add translations to gradle build (part 1 - jars)

This commit is contained in:
zzz
2021-01-03 09:08:21 -05:00
parent 2df5fb972a
commit 888311e34f
16 changed files with 77 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ sourceSets {
main {
java {
srcDir 'src'
srcDir 'build/messages-src'
}
}
}
@@ -12,3 +13,13 @@ dependencies {
compile project(':installer')
compile project(':apps:systray')
}
// 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/desktopgui/bundle-messages.sh".execute().text
}
}
jar.dependsOn bundle

1
apps/desktopgui/bundle-messages.sh Normal file → Executable file
View File

@@ -11,6 +11,7 @@
# zzz - public domain
# Mathiasdm - modifications for desktopgui
#
cd `dirname $0`
CLASS=net.i2p.desktopgui.messages
TMPFILE=build/javafiles.txt
export TZ=UTC

View File

@@ -6,6 +6,7 @@ sourceSets {
main {
java {
srcDir 'java/src'
srcDir 'java/build/messages-proxy-src'
}
}
test {
@@ -22,6 +23,15 @@ 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 bundleProxy {
doLast {
println "apps/i2ptunnel/java/bundle-messages-proxy.sh".execute().text
}
}
task i2ptunnelJar(type: Jar) {
from sourceSets.main.output
exclude '**/ui/*.class'
@@ -42,6 +52,7 @@ task i2ptunnelJar(type: Jar) {
into "net/i2p/i2ptunnel/resources"
})
}
i2ptunnelJar.dependsOn bundleProxy
task tempBeansJar(type: Jar) {
from sourceSets.main.output

View File

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

View File

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

View File

@@ -8,6 +8,7 @@ sourceSets {
main {
java {
srcDir 'java/src'
srcDir 'java/build/messages-src'
}
}
test {
@@ -21,6 +22,16 @@ dependencies {
api project(':core')
}
// 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/ministreaming/java/bundle-messages.sh".execute().text
}
}
jar.dependsOn bundle
jar {
manifest {
attributes 'Specification-Title': 'I2P Streaming API'

View File

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

View File

@@ -7,6 +7,8 @@ sourceSets {
main {
java {
srcDir 'java/src'
srcDir 'java/build/messages-countries-src'
srcDir 'java/build/messages-news-src'
}
}
}
@@ -40,6 +42,16 @@ if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVe
test.dependsOn scalaTest
}
// 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 bundleJar {
doLast {
println "apps/routerconsole/java/bundle-messages-countries.sh".execute().text
println "apps/routerconsole/java/bundle-messages-news.sh".execute().text
}
}
task consoleJar(type: Jar) {
from sourceSets.main.output
exclude 'net/i2p/router/web/helpers/**'
@@ -56,6 +68,7 @@ task consoleJar(type: Jar) {
into "net/i2p/router/news/resources"
})
}
consoleJar.dependsOn bundleJar
artifacts {
archives consoleJar

View File

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

View File

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

View File

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

0
apps/susimail/bundle-messages.sh Normal file → Executable file
View File

View File

@@ -10,6 +10,7 @@ sourceSets {
main {
java {
srcDir 'java/src'
srcDir 'java/build/messages-src'
exclude 'gnu/getopt'
exclude 'gnu/gettext'
}
@@ -67,6 +68,16 @@ if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVe
test.dependsOn scalaTest
}
// 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 "core/java/bundle-messages.sh".execute().text
}
}
jar.dependsOn bundle
jar {
manifest {
attributes 'Specification-Title': 'I2P Core API'

View File

@@ -10,6 +10,7 @@
#
# zzz - public domain
#
cd `dirname $0`
CLASS=net.i2p.util.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'
}
}
test {
@@ -26,6 +27,16 @@ dependencies {
testImplementation project(path: ':core', configuration: 'tests')
}
// 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 "router/java/bundle-messages.sh".execute().text
}
}
jar.dependsOn bundle
jar {
manifest {
attributes 'Specification-Title': 'I2P Router'

View File

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