diff --git a/starter/scripts/constants.dart b/starter/scripts/constants.dart index 3200c1c40..21ea56664 100644 --- a/starter/scripts/constants.dart +++ b/starter/scripts/constants.dart @@ -1,5 +1,5 @@ -const authProguardRules = ''' -# Keep Google Play Services Auth classes +const firebaseProguardRules = ''' +# Keep Google Play Services classes -keep class com.google.android.gms.** { *; } -keep interface com.google.android.gms.** { *; } -dontwarn com.google.android.gms.** diff --git a/starter/scripts/firebase_performance.dart b/starter/scripts/firebase_performance.dart index 4d048f07d..7c11d09bc 100644 --- a/starter/scripts/firebase_performance.dart +++ b/starter/scripts/firebase_performance.dart @@ -2,6 +2,8 @@ import 'dart:io'; import 'utils.dart'; import 'utils/firebase_utils.dart'; +import 'utils/proguard_utils.dart'; +import 'constants.dart'; // Adds the Firebase Performance SDK to the project void main(List arguments) { @@ -11,6 +13,7 @@ void main(List arguments) { addDependency('firebase_performance', '^0.10.0+11'); if (platforms.contains('android')) { + createProguardRules(firebaseProguardRules); addClasspathDependency( "classpath 'com.google.firebase:perf-plugin:1.4.2'"); addPluginDependency("apply plugin: 'com.google.firebase.firebase-perf'"); diff --git a/starter/scripts/modules/enable_auth.dart b/starter/scripts/modules/enable_auth.dart index 7e06b5e9e..412743aa4 100644 --- a/starter/scripts/modules/enable_auth.dart +++ b/starter/scripts/modules/enable_auth.dart @@ -55,7 +55,7 @@ ensemble_auth: updateAuthConfig(iOSClientId, androidClientId, webClientId, serverClientId); updateFirebaseConfig(platforms, arguments); if (platforms.contains('android')) { - createProguardRules(authProguardRules); + createProguardRules(firebaseProguardRules); addClasspathDependency( "classpath 'com.google.gms:google-services:4.3.15'"); addPluginDependency("apply plugin: 'com.google.gms.google-services'");