diff options
| author | Jules Aguillon | 2024-02-11 20:46:36 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2024-02-17 23:28:31 +0100 |
| commit | 8c290732607692cd94247f7e3e9c80fad1dfe516 (patch) | |
| tree | 1903ef13cc72626d0b12c712f9d15aede6fc67b4 /build.gradle | |
| parent | 38deb810f94d0e2fea91add4cd53fdd615d19d64 (diff) | |
| download | unexpected-keyboard-8c290732607692cd94247f7e3e9c80fad1dfe516.tar.gz unexpected-keyboard-8c290732607692cd94247f7e3e9c80fad1dfe516.zip | |
Compose key
The COMPOSE_PENDING modifier indicate whether a compose sequence is in
progress. The new key of kind Compose_pending sets the current state of
the sequence.
The compose sequences are compiled into a state machine by a python
script into a compact encoding.
The state of the pending compose is determined by the index of a state.
Diffstat (limited to 'build.gradle')
| -rw-r--r-- | build.gradle | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle index 139b27b..6544bb5 100644 --- a/build.gradle +++ b/build.gradle @@ -85,7 +85,6 @@ android { } dependencies { - } tasks.register('buildKeyboardFont') { @@ -108,6 +107,7 @@ tasks.withType(Test).configureEach { dependsOn 'genLayoutsList' dependsOn 'checkKeyboardLayouts' dependsOn 'syncTranslations' + dependsOn 'compileComposeSequences' } tasks.register('genLayoutsList') { @@ -138,6 +138,19 @@ tasks.register('syncTranslations') { } } +tasks.register('compileComposeSequences') { + def out = "srcs/juloo.keyboard2/ComposeKeyData.java" + println "\nGenerating ${out}" + exec { + def sequences = new File(projectDir, "srcs/compose").listFiles().findAll { + it.name.endsWith(".txt") + } + workingDir = projectDir + commandLine("python", "srcs/compose/compile.py", *sequences) + standardOutput = new FileOutputStream("${projectDir}/${out}") + } +} + tasks.named("preBuild") { dependsOn += "initDebugKeystore" dependsOn += "copyRawQwertyUS" |
