Skip to content

Commit

Permalink
Merge pull request #14 from arafaysaleem/build/add-apk-minification
Browse files Browse the repository at this point in the history
build(Gradle): Minify code using proguard
  • Loading branch information
arafaysaleem authored Jun 8, 2021
2 parents 382232d + 69004ad commit b448da1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ chores:
- any: ['.gitignore']

native/android:
- any: ['android']
- any: ['android/**/*']

gradle:
- any: ['android']
- any: ['android/**/*']
3 changes: 3 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ android {
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Flutter
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }

0 comments on commit b448da1

Please sign in to comment.