Skip to content

Commit

Permalink
Run gradle layout tasks at test
Browse files Browse the repository at this point in the history
  • Loading branch information
deftk committed Aug 31, 2023
1 parent 44ea2ce commit 2f767ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Then, run `./gradlew genLayoutsList` to add the layout to the app.
The last step will update the file `app/src/main/res/values/layouts.xml`, that you should
not edit directly.

Run `./gradlew lintKeyboardLayouts` to check some properties about your layout. This will
Run `./gradlew checkKeyboardLayouts` to check some properties about your layout. This will
change the file `check_layout.output`, which you should commit.

#### Adding a programming layout
Expand Down
7 changes: 6 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ tasks.register('buildKeyboardFont') {
}
}

tasks.withType(Test).configureEach {
dependsOn 'genLayoutsList'
dependsOn 'checkKeyboardLayouts'
}

tasks.register('genLayoutsList') {
println "Executing python script to generate keyboard layouts"
new ByteArrayOutputStream().withStream { bos ->
Expand All @@ -99,7 +104,7 @@ tasks.register('genLayoutsList') {
}
}

tasks.register('lintKeyboardLayouts') {
tasks.register('checkKeyboardLayouts') {
println "Executing python script to check keyboard layouts\n"
new ByteArrayOutputStream().withStream { bos ->
exec {
Expand Down

0 comments on commit 2f767ea

Please sign in to comment.