Skip to content

Commit

Permalink
feat(firebase): allow building LunaSea without setting up Firebase [s…
Browse files Browse the repository at this point in the history
…kip ci]
  • Loading branch information
JagandeepBrar committed Apr 3, 2022
1 parent d1cdfab commit d7431b1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
8 changes: 8 additions & 0 deletions lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -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.');
}
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d7431b1

Please sign in to comment.