[Flutter] Proguard 사용 안드로이드 앱 난독화

민태호·2024년 7월 23일
0

Flutter

목록 보기
6/23
post-thumbnail

API Key와 같이 보안이 중요한 값들은 난독화를 진행하여 디컴파일과 리버스 엔지니어링으로부터 보호해야 한다

android > app > proguard-rules.pro 파일 생성

생성 파일에 아래 내용 추가

-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.**  { *; }
-dontwarn io.flutter.embedding.**

-keep class com.google.firebase.** { *; }
## firebase 사용했기에 추가한 내용

android > app > build.gradle 파일에 다음 추가

minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

profile
Flutter Developer

0개의 댓글