@@ -33,6 +33,7 @@ Future<void> main() async {
3333 final String projectDir = config['dir' ];
3434 final String projectType = config['type' ];
3535 final String repo = config['repo' ];
36+ final source = ".keys-n-stuff/$projectDir " ;
3637
3738 print ('Project directory: $projectDir ' );
3839 print ('Project type: $projectType ' );
@@ -66,26 +67,29 @@ Future<void> main() async {
6667
6768 // Copy Firebase config files
6869 // Android
69- await copyFile ('.keys-n-stuff/$ projectDir /google-services.json' ,
70- 'android/app/google-services.json' );
70+ await copyFile (
71+ '$ source /google-services.json' , ' android/app/google-services.json' );
7172
7273 // iOS
73- await copyFile ('.keys-n-stuff/$ projectDir /GoogleService-Info.plist' ,
74+ await copyFile ('$ source /GoogleService-Info.plist' ,
7475 'ios/Runner/GoogleService-Info.plist' );
7576
7677 // macOS
77- await copyFile ('.keys-n-stuff/$ projectDir /GoogleService-Info.plist' ,
78+ await copyFile ('$ source /GoogleService-Info.plist' ,
7879 'macos/Runner/GoogleService-Info.plist' );
7980
8081 // Copy keystore properties file to android root
81- await copyFile ('.keys-n-stuff/$projectDir /prod.properties' ,
82- 'android/prod.properties' );
82+ await copyFile ('$source /prod.properties' , 'android/prod.properties' );
8383
8484 // Copy keystore file to android/app
85- final keystoreFile = File ('.keys-n-stuff/$ projectDir /prod.jks' );
85+ final keystoreFile = File ('$ source /prod.jks' );
8686 if (await keystoreFile.exists ()) {
87- await copyFile (
88- '.keys-n-stuff/$projectDir /prod.jks' , 'android/app/prod.jks' );
87+ await copyFile ('$source /prod.jks' , 'android/app/prod.jks' );
88+ }
89+
90+ final serviceAccountFile = File ('$source /service-account.json' );
91+ if (await serviceAccountFile.exists ()) {
92+ await copyFile ('$source /service-account.json' , 'service-account.json' );
8993 }
9094
9195 print (
0 commit comments