Skip to content

Commit 62fa70c

Browse files
committed
chore: enable r8
1 parent e547ecf commit 62fa70c

File tree

6 files changed

+23
-4
lines changed

6 files changed

+23
-4
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,15 @@ jobs:
5656
$ANDROID_HOME/build-tools/34.0.0/apksigner verify --print-certs \
5757
app/build/outputs/apk/release/app-release-signed.apk
5858
59+
- name: Rename APK
60+
run: |
61+
mv app/build/outputs/apk/release/app-release-signed.apk app/build/outputs/apk/release/chatguard.apk
62+
5963
- name: Upload Release APK
6064
uses: softprops/action-gh-release@v2
6165
with:
6266
tag_name: ${{ github.event.release.tag_name }}
6367
name: ${{ github.event.release.name }}
64-
files: app/build/outputs/apk/release/app-release-signed.apk
68+
files: app/build/outputs/apk/release/chatguard.apk
6569
env:
6670
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.idea/dictionaries/project.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ android {
2525

2626
buildTypes {
2727
release {
28-
isMinifyEnabled = false
28+
isMinifyEnabled = true
2929
proguardFiles(
3030
getDefaultProguardFile("proguard-android-optimize.txt"),
3131
"proguard-rules.pro"
3232
)
33+
signingConfig = signingConfigs.getByName("debug")
3334
}
3435
}
3536
compileOptions {

app/proguard-rules.pro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,10 @@
1818

1919
# If you keep the line number information, uncomment this to
2020
# hide the original source file name.
21-
#-renamesourcefileattribute SourceFile
21+
#-renamesourcefileattribute SourceFile
22+
-keep enum ir.amirroid.chatguard.** { *; }
23+
24+
-keepclassmembers class * {
25+
@android.webkit.JavascriptInterface <methods>;
26+
}
27+
-keepattributes JavascriptInterface

app/src/main/java/ir/amirroid/chatguard/ChatGuardApp.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ChatGuardApp : Application() {
4444
)
4545
)
4646

47-
setupGlobalExceptionHandler()
47+
if (!BuildConfig.DEBUG) setupGlobalExceptionHandler()
4848

4949
startKoin {
5050
androidContext(this@ChatGuardApp)

0 commit comments

Comments
 (0)