Skip to content

Commit

Permalink
Build: Add translations to gradle build (part 3 - only rebuild if nec…
Browse files Browse the repository at this point in the history
…essary)
  • Loading branch information
zzzi2p committed Jan 3, 2021
1 parent 152ad16 commit 2e180d4
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 12 deletions.
3 changes: 2 additions & 1 deletion apps/desktopgui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ dependencies {
// We don't support the "slow way"
task bundle {
doLast {
println "apps/desktopgui/bundle-messages.sh".execute().text
if (!(new File("$buildDir/classes/java/main/net/i2p/desktopgui/messages_de.class")).exists())
println "apps/desktopgui/bundle-messages.sh".execute().text
}
}
jar.dependsOn bundle
3 changes: 2 additions & 1 deletion apps/i2psnark/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ artifacts {
// We don't support the "slow way"
task bundle {
doLast {
println "apps/i2psnark/java/bundle-messages.sh".execute().text
if (!(new File("$buildDir/classes/java/main/org/klomp/snark/web/messages_de.class")).exists())
println "apps/i2psnark/java/bundle-messages.sh".execute().text
}
}
war.dependsOn bundle
Expand Down
6 changes: 4 additions & 2 deletions apps/i2ptunnel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ dependencies {
// We don't support the "slow way"
task bundleProxy {
doLast {
println "apps/i2ptunnel/java/bundle-messages-proxy.sh".execute().text
if (!(new File("$buildDir/classes/java/main/net/i2p/i2ptunnel/proxy/messages_de.class")).exists())
println "apps/i2ptunnel/java/bundle-messages-proxy.sh".execute().text
}
}

task bundle {
doLast {
println "apps/i2ptunnel/java/bundle-messages.sh".execute().text
if (!(new File("$buildDir/classes/java/main/net/i2p/i2ptunnel/web/messages_de.class")).exists())
println "apps/i2ptunnel/java/bundle-messages.sh".execute().text
}
}

Expand Down
3 changes: 2 additions & 1 deletion apps/ministreaming/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ dependencies {
// We don't support the "slow way"
task bundle {
doLast {
println "apps/ministreaming/java/bundle-messages.sh".execute().text
if (!(new File("$buildDir/classes/java/main/net/i2p/client/streaming/messages_de.class")).exists())
println "apps/ministreaming/java/bundle-messages.sh".execute().text
}
}
jar.dependsOn bundle
Expand Down
9 changes: 6 additions & 3 deletions apps/routerconsole/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,16 @@ if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVe
// 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
if (!(new File("$buildDir/classes/java/main/net/i2p/router/countries/messages_de.class")).exists())
println "apps/routerconsole/java/bundle-messages-countries.sh".execute().text
if (!(new File("$buildDir/classes/java/main/net/i2p/router/news/messages_de.class")).exists())
println "apps/routerconsole/java/bundle-messages-news.sh".execute().text
}
}
task bundle {
doLast {
println "apps/routerconsole/java/bundle-messages.sh".execute().text
if (!(new File("$buildDir/classes/java/main/net/i2p/router/web/messages_de.class")).exists())
println "apps/routerconsole/java/bundle-messages.sh".execute().text
}
}

Expand Down
3 changes: 2 additions & 1 deletion apps/susidns/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ dependencies {
// We don't support the "slow way"
task bundle {
doLast {
println "apps/susidns/src/bundle-messages.sh".execute().text
if (!(new File("$buildDir/classes/java/main/i2p/susi/dns/messages_de.class")).exists())
println "apps/susidns/src/bundle-messages.sh".execute().text
}
}
war.dependsOn bundle
Expand Down
3 changes: 2 additions & 1 deletion apps/susimail/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ dependencies {
// We don't support the "slow way"
task bundle {
doLast {
println "apps/susimail/bundle-messages.sh".execute().text
if (!(new File("$buildDir/classes/java/main/i2p/susi/webmail/messages_de.class")).exists())
println "apps/susimail/bundle-messages.sh".execute().text
}
}
war.dependsOn bundle
Expand Down
3 changes: 2 additions & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVe
// We don't support the "slow way"
task bundle {
doLast {
println "core/java/bundle-messages.sh".execute().text
if (!(new File("$buildDir/classes/java/main/net/i2p/util/messages_de.class")).exists())
println "core/java/bundle-messages.sh".execute().text
}
}
jar.dependsOn bundle
Expand Down
3 changes: 2 additions & 1 deletion router/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ dependencies {
// We don't support the "slow way"
task bundle {
doLast {
println "router/java/bundle-messages.sh".execute().text
if (!(new File("$buildDir/classes/java/main/net/i2p/router/util/messages_de.class")).exists())
println "router/java/bundle-messages.sh".execute().text
}
}
jar.dependsOn bundle
Expand Down

0 comments on commit 2e180d4

Please sign in to comment.