Skip to content

Commit

Permalink
* Enable R8 with custom proguard fules for resource shrinking/unused …
Browse files Browse the repository at this point in the history
…code removal without code obfuscation

* Bug fix: Do not display text content preview for Voice/Graphics note
  • Loading branch information
tuancoltech committed Nov 10, 2024
1 parent 1dc6f4b commit c264108
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ android {
]
}
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.testRelease
manifestPlaceholders = [
Expand Down
8 changes: 7 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,10 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile
-keep class dev.arkbuilders.arklib.** { *; }
-dontwarn javax.xml.stream.XMLResolver
-dontwarn org.slf4j.impl.StaticLoggerBinder
-dontobfuscate

-keepattributes Signature
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class NotesListAdapter(

if (note is TextNote) {
holder.contentPreview.text = note.text
} else {
holder.contentPreview.text = ""
}
holder.layoutAudioView.root.gone()
holder.ivGraphicThumb.gone()
Expand Down

0 comments on commit c264108

Please sign in to comment.