diff --git a/app/build.gradle.kts b/app/build.gradle.kts index fc32ffb..d3ffe5f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { object Versions { private const val versionMajor = 2 private const val versionMinor = 0 - private const val versionPatch = 6 + private const val versionPatch = 8 const val minSdk = 28 const val targetSdk = 33 diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index f1b4245..da4f26f 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -15,7 +15,14 @@ # Uncomment this to preserve the line number information for # debugging stack traces. #-keepattributes SourceFile,LineNumberTable +-dontobfuscate +#-dontshrink +#-dontoptimize +-verbose # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile + +# Fix crash when using minify/shrinkingresource +-keep class dev.vdbroek.nekos.models.** { *; } diff --git a/app/src/main/java/dev/vdbroek/nekos/models/Errors.kt b/app/src/main/java/dev/vdbroek/nekos/models/Errors.kt index 80a1c9d..3b38fd6 100644 --- a/app/src/main/java/dev/vdbroek/nekos/models/Errors.kt +++ b/app/src/main/java/dev/vdbroek/nekos/models/Errors.kt @@ -1,16 +1,11 @@ package dev.vdbroek.nekos.models -import androidx.annotation.Keep - -@Keep data class HttpException( val message: String? ) -@Keep class EndException(override val message: String) : Exception(message) -@Keep class ApiException( httpException: HttpException, label: String = "UNKNOWN" diff --git a/app/src/main/java/dev/vdbroek/nekos/models/Nekos.kt b/app/src/main/java/dev/vdbroek/nekos/models/Nekos.kt index aa668aa..592b81e 100644 --- a/app/src/main/java/dev/vdbroek/nekos/models/Nekos.kt +++ b/app/src/main/java/dev/vdbroek/nekos/models/Nekos.kt @@ -1,20 +1,15 @@ package dev.vdbroek.nekos.models -import androidx.annotation.Keep - -@Keep data class Uploader( val id: String, val username: String ) -@Keep data class Approver( val id: String, val username: String ) -@Keep data class Neko( val id: String, val originalHash: String, @@ -33,13 +28,11 @@ data class Neko( fun getThumbnailUrl(): String = "https://nekos.moe/thumbnail/$id" } -@Keep data class TagsResponse( val options: Any?, val tags: ArrayList ) -@Keep data class NekosResponse( val images: MutableList ) diff --git a/app/src/main/java/dev/vdbroek/nekos/models/UserData.kt b/app/src/main/java/dev/vdbroek/nekos/models/UserData.kt index c40ed24..d1d6a8f 100644 --- a/app/src/main/java/dev/vdbroek/nekos/models/UserData.kt +++ b/app/src/main/java/dev/vdbroek/nekos/models/UserData.kt @@ -1,13 +1,9 @@ package dev.vdbroek.nekos.models -import androidx.annotation.Keep - -@Keep data class UserResponse( val user: UserData ) -@Keep data class UserData( val id: String, val username: String, @@ -22,7 +18,6 @@ data class UserData( val savedTags: ArrayList ) -@Keep data class LoginResponse( val token: String ) diff --git a/app/src/main/java/dev/vdbroek/nekos/utils/Response.kt b/app/src/main/java/dev/vdbroek/nekos/utils/Response.kt index c753806..4c85578 100644 --- a/app/src/main/java/dev/vdbroek/nekos/utils/Response.kt +++ b/app/src/main/java/dev/vdbroek/nekos/utils/Response.kt @@ -1,6 +1,3 @@ package dev.vdbroek.nekos.utils -import androidx.annotation.Keep - -@Keep data class Response(val value: V, val exception: E)