Skip to content

Commit a621b8a

Browse files
authored
Add proguard rule to keep the class for all implementations of FlutterPlugin (flutter#154677)
Fixes flutter#154580, for the time being. We should follow up to determine why this is necessary, but I think it is important to un-break these specific plugins for now.
1 parent 2b8072e commit a621b8a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/flutter_tools/gradle/flutter_proguard_rules.pro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,10 @@
55

66
# The android.** package is provided by the OS at runtime.
77
-dontwarn android.**
8+
9+
# In some cases, R8 is incorrectly stripping plugin classes. Keep
10+
# all implementations of FlutterPlugin until we can determine
11+
# why this is the case.
12+
# See https://github.com/flutter/flutter/issues/154580.
13+
-if class * implements io.flutter.embedding.engine.plugins.FlutterPlugin
14+
-keep,allowoptimization,allowshrinking,allowobfuscation class <1>

0 commit comments

Comments
 (0)