abouttreesummaryrefslogcommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorJules Aguillon2025-12-27 23:49:50 +0100
committerGitHub2025-12-27 23:49:50 +0100
commitdfaf4dbb5766bf134cbf97d0516493e2256d2e5a (patch)
tree818f9e7241c86a73e73e4fba40cb08bd78599c3b /build.gradle.kts
parentdab50e0572e98d00be1645e3c0843576eb1fb249 (diff)
downloadunexpected-keyboard-dfaf4dbb5766bf134cbf97d0516493e2256d2e5a.tar.gz
unexpected-keyboard-dfaf4dbb5766bf134cbf97d0516493e2256d2e5a.zip
More practical definition of method.xml (#1149)
Locale are now defined in `gen_method_xml.py` in a more convenient and checked way. It contains both the locale definition and the generation script. `method.xml` is generated with: gradle test The goal is to support dictionaries for spell checking.
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts14
1 files changed, 12 insertions, 2 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 912409b..e111ac8 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -113,6 +113,16 @@ val genLayoutsList by tasks.registering(Exec::class) {
commandLine("python", "gen_layouts.py")
}
+val genMethodXml by tasks.registering(Exec::class) {
+ val out = projectDir.resolve("res/xml/method.xml")
+ inputs.file(projectDir.resolve("gen_method_xml.py"))
+ outputs.file(out)
+ doFirst { println("\nGenerating res/xml/method.xml") }
+ doFirst { standardOutput = FileOutputStream(out) }
+ workingDir = projectDir
+ commandLine("python", "gen_method_xml.py")
+}
+
val checkKeyboardLayouts by tasks.registering(Exec::class) {
inputs.dir(projectDir.resolve("srcs/layouts"))
inputs.file(projectDir.resolve("srcs/juloo.keyboard2/KeyValue.java"))
@@ -137,7 +147,7 @@ val compileComposeSequences by tasks.registering(Exec::class) {
}
tasks.withType(Test::class).configureEach {
- dependsOn(genLayoutsList, checkKeyboardLayouts, compileComposeSequences)
+ dependsOn(genLayoutsList, checkKeyboardLayouts, compileComposeSequences, genMethodXml)
}
val initDebugKeystore by tasks.registering(Exec::class) {
@@ -165,5 +175,5 @@ tasks.named("preBuild") {
// Gradle) but doesn't create a dependency. These rules update files that are
// checked in the repository that don't need to be updated during regular
// builds.
- mustRunAfter(genEmojis, genLayoutsList, compileComposeSequences)
+ mustRunAfter(genEmojis, genLayoutsList, compileComposeSequences, genMethodXml)
}