From 77c4a27c4c37b3620defcab94ffd1b2f536c88cb Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Mon, 2 Feb 2026 00:20:00 +0100 Subject: Spell checking (#1137) This adds dictionary-based spell checking to the keyboard. The keyboard looks at the word being typed and matches it against a dictionary to either complete the rest of the word or find alternative spellings. The core of this feature is implemented in cdict, which is included as a submodule in vendor/cidct. Cdict is developped at https://github.com/Julow/cdict The dictionaries are hosted at https://github.com/Julow/Unexpected-Keyboard-dictionaries/ The wordlists used to build the dictionaries are the same ones used by HeliBoard from https://codeberg.org/Helium314/aosp-dictionaries - Add an activity accessible from the launcher app that lists available dictionaries with a download button. The DictionaryListView view shows the list of available dictionaries and handles downloading and installing them. - The Dictionaries class manages installed dictionaries. Dictionaries are installed as individual files into the app's private directory. - Available dictionaries are listed in dictionaries.xml, which is generated when building Unexpected-Keyboard-dictionaries. method.xml mentions the dictionary name for each locales. --- build.gradle.kts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'build.gradle.kts') diff --git a/build.gradle.kts b/build.gradle.kts index e111ac8..782b8db 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,7 +27,7 @@ android { sourceSets { named("main") { manifest.srcFile("AndroidManifest.xml") - java.srcDirs("srcs/juloo.keyboard2") + java.srcDirs("srcs/juloo.keyboard2", "vendor/cdict/java/juloo.cdict") res.srcDirs("res", "build/generated-resources") assets.srcDirs("assets") } @@ -37,6 +37,12 @@ android { } } + externalNativeBuild { + ndkBuild { + path = file("vendor/Android.mk") + } + } + signingConfigs { // Debug builds will always be signed. If no environment variables are set, a default // keystore will be initialized by the task initDebugKeystore and used. This keystore @@ -116,6 +122,7 @@ val genLayoutsList by tasks.registering(Exec::class) { val genMethodXml by tasks.registering(Exec::class) { val out = projectDir.resolve("res/xml/method.xml") inputs.file(projectDir.resolve("gen_method_xml.py")) + inputs.file(projectDir.resolve("res/values/dictionaries.xml")) outputs.file(out) doFirst { println("\nGenerating res/xml/method.xml") } doFirst { standardOutput = FileOutputStream(out) } -- cgit v1.2.3