diff options
| author | Jules Aguillon | 2026-02-24 22:50:16 +0100 |
|---|---|---|
| committer | GitHub | 2026-02-24 22:50:16 +0100 |
| commit | 9863dcea9eaa197177552f8621091b3e0858cc76 (patch) | |
| tree | 1453cfaa99be1bed02e46341b327b287ea5a5ffd /build.gradle.kts | |
| parent | a80afa5fbebd023167394cdc3e31fc26790cffaa (diff) | |
| download | unexpected-keyboard-9863dcea9eaa197177552f8621091b3e0858cc76.tar.gz unexpected-keyboard-9863dcea9eaa197177552f8621091b3e0858cc76.zip | |
gradle: Show an error when Git submodules are not initialized (#1188)
* CONTRIBUTING: Document Git submodules
* build: Error during build if the submodules are not initialized
Diffstat (limited to 'build.gradle.kts')
| -rw-r--r-- | build.gradle.kts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 782b8db..8c8b6d7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -92,6 +92,14 @@ android { } } + +// This raises an error with an informative message instead of the confusing +// ndk-build errors that occur when submodules are not initialized. +gradle.projectsEvaluated { + if (!file("vendor/cdict/java").exists()) + throw GradleException("Git submodules not initialized. Run 'git submodule update --init'") +} + val buildKeyboardFont by tasks.registering(Exec::class) { val `in` = projectDir.resolve("srcs/special_font") val out = layout.projectDirectory.file("assets/special_font.ttf") |
