feat(firebase): allow building LunaSea without setting up Firebase [skip ci]

This commit is contained in:
Jagandeep Brar
2022-04-03 15:14:15 -04:00
parent d1cdfab885
commit d7431b1102
3 changed files with 12 additions and 4 deletions

1
.gitignore vendored
View File

@@ -68,7 +68,6 @@ macos/LunaSea.pkg
# Keys & Service Accounts
android/key.jks
android/key.properties
lib/firebase_options.dart
# Node Dependency directories
node_modules/

View File

@@ -0,0 +1,8 @@
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
/// Stub that allows building the application but with Firebase disabled.
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
throw UnsupportedError('Firebase is not supported on this platform.');
}
}

View File

@@ -22,14 +22,15 @@
"fastlane:update:android": "cd android && bundle update",
"fastlane:update:ios": "cd ios && bundle update",
"fastlane:update:macos": "cd macos && bundle update",
"flavor:ignore": "git update-index --skip-worktree .flavor",
"flavor:unignore": "git update-index --no-skip-worktree .flavor",
"generate": "npm run generate:firebase && npm run generate:assets && npm run generate:build_runner && npm run generate:localization",
"generate:assets": "dart pub global activate spider && spider build",
"generate:build_runner": "flutter packages pub run build_runner build --delete-conflicting-outputs",
"generate:firebase": "rm -rf lib/firebase_options.dart && npm install -g firebase-tools && firebase login && dart pub global activate flutterfire_cli && flutterfire configure",
"generate:localization": "dart ./scripts/generate_localization.dart",
"prepare": "husky install && flutter pub get",
"git:ignore": "npm run git:ignore:flavor && npm run git:ignore:firebase",
"git:ignore:flavor": "git update-index --skip-worktree .flavor",
"git:ignore:firebase": "git update-index --skip-worktree lib/firebase_options.dart",
"prepare": "husky install && npm run git:ignore && flutter pub get",
"prepare:keychain": "npm run prepare:keychain:ios && npm run prepare:keychain:macos",
"prepare:keychain:ios": "cd ios && bundle exec fastlane keychain_create && bundle exec fastlane keychain_setup",
"prepare:keychain:macos": "cd macos && bundle exec fastlane keychain_create && bundle exec fastlane keychain_setup",