Skip to content

Commit

Permalink
Add proguard rules to keep classes called from C++ and update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Garcia committed Sep 4, 2019
1 parent 97daec6 commit e38a9a5
Show file tree
Hide file tree
Showing 22 changed files with 132 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/catalog/android/app/build.gradle
Expand Up @@ -45,6 +45,9 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions examples/catalog/android/app/proguard-rules.pro
@@ -0,0 +1,9 @@
# Proguard is enabled by default on release mode.
# https://flutter.dev/docs/deployment/android#enabling-proguard
-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 android.**
3 changes: 3 additions & 0 deletions examples/flutter_gallery/android/app/build.gradle
Expand Up @@ -56,6 +56,9 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

Expand Down
9 changes: 9 additions & 0 deletions examples/flutter_gallery/android/app/proguard-rules.pro
@@ -0,0 +1,9 @@
# Proguard is enabled by default on release mode.
# https://flutter.dev/docs/deployment/android#enabling-proguard
-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 android.**
3 changes: 3 additions & 0 deletions examples/flutter_view/android/app/build.gradle
Expand Up @@ -45,6 +45,9 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions examples/flutter_view/android/app/proguard-rules.pro
@@ -0,0 +1,9 @@
# Proguard is enabled by default on release mode.
# https://flutter.dev/docs/deployment/android#enabling-proguard
-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 android.**
3 changes: 3 additions & 0 deletions examples/hello_world/android/app/build.gradle
Expand Up @@ -45,6 +45,9 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions examples/hello_world/android/app/proguard-rules.pro
@@ -0,0 +1,9 @@
# Proguard is enabled by default on release mode.
# https://flutter.dev/docs/deployment/android#enabling-proguard
-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 android.**
3 changes: 3 additions & 0 deletions examples/image_list/android/app/build.gradle
Expand Up @@ -46,6 +46,9 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions examples/image_list/android/app/proguard-rules.pro
@@ -0,0 +1,9 @@
# Proguard is enabled by default on release mode.
# https://flutter.dev/docs/deployment/android#enabling-proguard
-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 android.**
3 changes: 3 additions & 0 deletions examples/layers/android/app/build.gradle
Expand Up @@ -45,6 +45,9 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions examples/layers/android/app/proguard-rules.pro
@@ -0,0 +1,9 @@
# Proguard is enabled by default on release mode.
# https://flutter.dev/docs/deployment/android#enabling-proguard
-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 android.**
3 changes: 3 additions & 0 deletions examples/platform_channel/android/app/build.gradle
Expand Up @@ -45,6 +45,9 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions examples/platform_channel/android/app/proguard-rules.pro
@@ -0,0 +1,9 @@
# Proguard is enabled by default on release mode.
# https://flutter.dev/docs/deployment/android#enabling-proguard
-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 android.**
3 changes: 3 additions & 0 deletions examples/platform_channel_swift/android/app/build.gradle
Expand Up @@ -45,6 +45,9 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Expand Down
@@ -0,0 +1,9 @@
# Proguard is enabled by default on release mode.
# https://flutter.dev/docs/deployment/android#enabling-proguard
-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 android.**
3 changes: 3 additions & 0 deletions examples/platform_view/android/app/build.gradle
Expand Up @@ -45,6 +45,9 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions examples/platform_view/android/app/proguard-rules.pro
@@ -0,0 +1,9 @@
# Proguard is enabled by default on release mode.
# https://flutter.dev/docs/deployment/android#enabling-proguard
-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 android.**
3 changes: 3 additions & 0 deletions examples/stocks/android/app/build.gradle
Expand Up @@ -45,6 +45,9 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions examples/stocks/android/app/proguard-rules.pro
@@ -0,0 +1,9 @@
# Proguard is enabled by default on release mode.
# https://flutter.dev/docs/deployment/android#enabling-proguard
-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 android.**
@@ -1,3 +1,9 @@
# Proguard is enabled by default on release mode.
# https://flutter.dev/docs/deployment/android#enabling-proguard
-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 android.**
@@ -1,3 +1,9 @@
# Proguard is enabled by default on release mode.
# https://flutter.dev/docs/deployment/android#enabling-proguard
-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 android.**

0 comments on commit e38a9a5

Please sign in to comment.