AngeloAvv / flutter_flavorizr

A flutter utility to easily create flavors in your flutter application
https://pub.dev/packages/flutter_flavorizr
MIT License
456 stars 81 forks source link

Google firebase service file location #195

Closed beetechsoln closed 1 year ago

beetechsoln commented 1 year ago

Where is the fisebase file located in the below code. As I have tried to keep it in the assets file. But it created the empty google service file and I am unable to receive the firbase notification

assets:

flavors: apple: app: name: "Apple"

android:
  applicationId: "com.example.apple"
  firebase:
    config: "firebase/apple/google-services.json"

ios:
  bundleId: "com.example.apple"
  firebase:
    config: "firebase/apple/GoogleService-Info.plist"

banana: app: name: "Banana"

android:
  applicationId: "com.example.banana"
  firebase:
    config: "firebase/banana/google-services.json"
ios:
  bundleId: "com.example.banana"
  firebase:
    config: "firebase/banana/GoogleService-Info.plist"

I get this resposnse
Building package executable... Built flutter_flavorizr:flutter_flavorizr. Executing task google:firebase Running IOSTargetsFirebaseProcessor Running FileProcessor: writing file ios/Runner/GoogleService-Info.plist with nested EmptyFileProcessor Running ShellProcessor: Running script 'ruby' with arguments .tmp/scripts/ios/add_file.rb, ios/Runner.xcodeproj, Runner/GoogleService-Info.plist Running FileProcessor: writing file .tmp/ios/firebaseScript.sh with nested IOSFirebaseScriptProcessor Running ShellProcessor: Running script 'ruby' with arguments .tmp/scripts/ios/add_firebase_build_phase.rb, ios/Runner.xcodeproj, .tmp/ios/firebaseScript.sh

AngeloAvv commented 1 year ago

There's something wrong with your instruction set: according to your output, you're missing some processors to be executed before running google:firebase.

beetechsoln commented 1 year ago

I did run other porcessors before running google:firebase as instructed flutter pub run flutter_flavorizr -p assets:download

AngeloAvv commented 1 year ago

assets:extract is missing also

beetechsoln commented 1 year ago

okay This is what I get after adding that code flutter pub run flutter_flavorizr -p assets:download,assets:extract,google:firebase,assets:clean Deprecated. Use dart run instead. Building package executable... Built flutter_flavorizr:flutter_flavorizr. Executing task assets:download

Executing task assets:extract

Executing task google:firebase Running IOSTargetsFirebaseProcessor Running FileProcessor: writing file ios/Runner/GoogleService-Info.plist with nested EmptyFileProcessor Running ShellProcessor: Running script 'ruby' with arguments .tmp/scripts/ios/add_file.rb, ios/Runner.xcodeproj, Runner/GoogleService-Info.plist Running FileProcessor: writing file .tmp/ios/firebaseScript.sh with nested IOSFirebaseScriptProcessor Running ShellProcessor: Running script 'ruby' with arguments .tmp/scripts/ios/add_firebase_build_phase.rb, ios/Runner.xcodeproj, .tmp/ios/firebaseScript.sh

Executing task assets:clean Running Deleting file from assets.tmp.zip Running Deleting file from .tmp

AngeloAvv commented 1 year ago

How can flavors work if you don't customize the whole project by calling the others processors?

You're missing android:, flutter: and ios: processors

I don't understand why you're executing the process by removing default processors.