refactors changelog and version handling, fixes crash on startup due to version mismatch.

This commit is contained in:
octoshrimpy
2024-11-02 15:11:20 -04:00
parent b2c5aab7d5
commit 2d902150b1
8 changed files with 74 additions and 44 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ dependencies {
// moshi
implementation "com.squareup.moshi:moshi:$moshi_version"
debugImplementation "com.squareup.moshi:moshi-kotlin:$moshi_version"
kaptRelease "com.squareup.moshi:moshi-kotlin-codegen:$moshi_version"
kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshi_version"
// coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
+5
View File
@@ -60,6 +60,11 @@
}
# Retain generated JsonAdapters if annotated type is retained.
-keep class **JsonAdapter {
<init>(...);
<fields>;
}
-if @com.squareup.moshi.JsonClass class *
-keep class <1>JsonAdapter {
<init>(...);
@@ -49,6 +49,11 @@ class ChangelogAdapter(private val context: Context) : QkAdapter<ChangelogAdapte
changes += changelog.fixed.map { change -> ChangelogItem(1, "• $change") }
changes += ChangelogItem(0, "")
}
if (changelog.removed.isNotEmpty()) {
changes += ChangelogItem(0, context.getString(R.string.changelog_removed))
changes += changelog.removed.map { change -> ChangelogItem(1, "• $change") }
changes += ChangelogItem(0, "")
}
data = changes
}
@@ -397,6 +397,7 @@
<string name="changelog_added" translatable="false">Added</string>
<string name="changelog_improved" translatable="false">Improved</string>
<string name="changelog_fixed" translatable="false">Fixed</string>
<string name="changelog_removed" translatable="false">Removed</string>
<string name="changelog_more" translatable="false">More</string>
<string name="changelog_dismiss" translatable="false">Dismiss</string>