Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions viewmodel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ android {
minSdk 14
targetSdk libs.versions.targetSdk.get().toInteger()
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
consumerProguardFiles 'proguard-rules.pro'
}
}

Expand Down
11 changes: 11 additions & 0 deletions viewmodel/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# lich-viewmodel keys ViewModelStore entries by
# "lich:" + factory.javaClass.canonicalName, so every ViewModelFactory subclass
# must remain a distinct, stably-named class. Without this rule, R8 full mode
# horizontally merges the stateless companion factories into a single class,
# making all keys collide and returning the wrong ViewModel (ClassCastException).
#
# -keepnames (= -keep,allowshrinking) only pins the class *name*: it prevents
# renaming and class merging, keeps no members, and still allows unused
# factories to be removed.
#
-keepnames class * extends com.linecorp.lich.viewmodel.ViewModelFactory
Loading