Skip to content

Commit

Permalink
added proguard rules for model class
Browse files Browse the repository at this point in the history
  • Loading branch information
suyash01 committed May 11, 2024
1 parent 8cda855 commit 9f954a1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ android {
applicationId = "com.suyash.creditmanager"
minSdk = 26
targetSdk = 34
versionCode = 13
versionName = "1.0.12"
versionCode = 14
versionName = "1.0.13"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
10 changes: 9 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,12 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

-dontnote com.google.gson.annotations.SerializedName
-keepclasseswithmembers,allowobfuscation,includedescriptorclasses class * {
@com.google.gson.annotations.SerializedName <fields>;
}
-keepclassmembers enum * {
@com.google.gson.annotations.SerializedName <fields>;
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
package com.suyash.creditmanager.domain.util

import com.google.gson.annotations.SerializedName
import com.suyash.creditmanager.R

enum class CardType(val id: Int) {
@SerializedName("VISA")
VISA(R.drawable.visa_icon),
@SerializedName("MASTERCARD")
MASTERCARD(R.drawable.mastercard_icon),
@SerializedName("AMEX")
AMEX(R.drawable.amex_icon),
@SerializedName("DISCOVER")
DISCOVER(R.drawable.discover_icon),
@SerializedName("DCI")
DCI(R.drawable.dci_icon),
@SerializedName("JCB")
JCB(R.drawable.jcb_icon),
@SerializedName("RUPAY")
RUPAY(R.drawable.rupay_icon);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package com.suyash.creditmanager.domain.util

import com.google.gson.annotations.SerializedName

enum class TransactionType {
@SerializedName("DEBIT")
DEBIT,
@SerializedName("CREDIT")
CREDIT
}

0 comments on commit 9f954a1

Please sign in to comment.