Skip to content

Commit cea3d43

Browse files
Download db (#548)
* feat: contract-driven dynamic database download from API * feat: persist download states across app relaunches * fix: fix installed keyboards not showing in Settings * feat: trigger download and "Downloading" state from Select Translation Source Language Screen * redirect to Download Screen on confirming translation source change * feat: set Update state for download button using data version endpoint * fix download Toast display message * Add new YAML based contract files * Finalize form of YAML contracts * Fix included double quote in en.yaml * Update version of data contracts with necessary fields * Minor fix in comment in contracts * feat: change to using YAML for data contract * remove json contracts * fix minor typo * Update German contract with missing displayValue fields for declensions * Update contracts with fully indexed conjugations and declensions * Fixes to DE data contract * fix to fit new indexed contract * feat: "All languages" download action * feat: add empty state for download screen * Misc fix of comment --------- Co-authored-by: Andrew Tavis McAllister <andrew.t.mcallister@gmail.com>
1 parent e9378fa commit cea3d43

34 files changed

+2993
-764
lines changed

app/build.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,13 @@ dependencies {
233233
// ==========================
234234
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.1.21")
235235

236+
// ==========================
237+
// API
238+
// ==========================
239+
implementation("com.squareup.retrofit2:retrofit:2.11.0")
240+
implementation("com.squareup.retrofit2:converter-gson:2.11.0")
241+
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
242+
236243
// ==========================
237244
// Layout and UI
238245
// ==========================
@@ -316,8 +323,9 @@ dependencies {
316323
api("com.google.code.gson:gson:2.13.1")
317324
api("com.github.bumptech.glide:glide:4.16.0")
318325
ksp("com.github.bumptech.glide:ksp:4.16.0")
319-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1")
320326
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
327+
implementation("com.charleskorn.kaml:kaml:0.57.0")
328+
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7")
321329
}
322330

323331
tasks.register<Copy>("moveFromi18n") {

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<uses-permission
1010
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
1111
android:maxSdkVersion="28" />
12+
<uses-permission android:name="android.permission.INTERNET" />
13+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
1214

1315
<application
1416
android:allowBackup="true"

app/src/main/assets/data-contracts/de.json

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)