Skip to content

Commit

Permalink
Don't redirect Gradle task output to stdout except for checkKeyboardL…
Browse files Browse the repository at this point in the history
…ayouts
  • Loading branch information
deftk committed Oct 10, 2023
1 parent b53e764 commit 61fe67e
Showing 1 changed file with 11 additions and 24 deletions.
35 changes: 11 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,12 @@ dependencies {
tasks.register('buildKeyboardFont') {
println "\nBuilding assets/special_font.ttf"
mkdir "$buildDir"
new ByteArrayOutputStream().withStream { bos ->
exec {
workingDir "$projectDir/special_font"
def svgFiles = workingDir.listFiles().findAll {
it.isFile() && it.name.endsWith(".svg")
}

commandLine("fontforge", "-lang=ff", "-script", "build.pe", "$buildDir/special_font.ttf", *svgFiles)
standardOutput = bos
exec {
workingDir "$projectDir/special_font"
def svgFiles = workingDir.listFiles().findAll {
it.isFile() && it.name.endsWith(".svg")
}
println "$bos"
commandLine("fontforge", "-lang=ff", "-script", "build.pe", "$buildDir/special_font.ttf", *svgFiles)
}
copy {
from "$buildDir/special_font.ttf"
Expand All @@ -105,13 +100,9 @@ tasks.withType(Test).configureEach {

tasks.register('genLayoutsList') {
println "\nGenerating res/values/layouts.xml"
new ByteArrayOutputStream().withStream { bos ->
exec {
workingDir = projectDir
commandLine "python", "gen_layouts.py"
standardOutput = bos
}
println "$bos"
exec {
workingDir = projectDir
commandLine "python", "gen_layouts.py"
}
}

Expand All @@ -133,13 +124,9 @@ tasks.register('checkKeyboardLayouts') {

tasks.register('syncTranslations') {
println "\nUpdating translations"
new ByteArrayOutputStream().withStream { bos ->
exec {
workingDir = projectDir
commandLine "python", "sync_translations.py"
standardOutput = bos
}
println "$bos"
exec {
workingDir = projectDir
commandLine "python", "sync_translations.py"
}
}

Expand Down

0 comments on commit 61fe67e

Please sign in to comment.