fix: Ensure update-related data classes are retained (#269)

Prevents a crash if Proguard optimises them away in release builds.
This commit is contained in:
Nik Clayton 2023-11-17 12:27:28 +01:00 committed by GitHub
parent 4a6981fc07
commit 46d81b3c68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -17,15 +17,18 @@
package app.pachli.updatecheck
import androidx.annotation.Keep
import at.connyduck.calladapter.networkresult.NetworkResult
import retrofit2.http.GET
import retrofit2.http.Path
@Keep
data class FdroidPackageVersion(
val versionName: String,
val versionCode: Int
)
@Keep
data class FdroidPackage(
val packageName: String,
val suggestedVersionCode: Int,

View File

@ -17,11 +17,13 @@
package app.pachli.updatecheck
import androidx.annotation.Keep
import at.connyduck.calladapter.networkresult.NetworkResult
import com.google.gson.annotations.SerializedName
import retrofit2.http.GET
import retrofit2.http.Path
@Keep
data class GitHubReleaseAsset(
/** File name for the asset, e.g., "113.apk" */
val name: String,
@ -30,6 +32,7 @@ data class GitHubReleaseAsset(
@SerializedName("content_type") val contentType: String
)
@Keep
data class GitHubRelease(
/** URL for the release's web page */
@SerializedName("html_url") val htmlUrl: String,