Flutter 難読化と最小化

手順

  1. ファイルを新規作成

    android/app/proguard-rules.pro

    1
    2
    3
    4
    5
    6
    7
    #Flutter Wrapper
    -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.** { *; }
  2. ビルド設定

    android/app/build.gradle

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    android {
    ...
    buildTypes {
    release {
    signingConfig signingConfigs.release
    minifyEnabled true
    useProguard true
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    }
    }

コメント

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×