Skip to content

Commit c2c48ad

Browse files
committed
firebase
1 parent 57cf80c commit c2c48ad

21 files changed

+309
-0
lines changed

.firebaserc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "mcgamejam-temporary"
4+
}
5+
}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ app.*.map.json
4242
/android/app/debug
4343
/android/app/profile
4444
/android/app/release
45+
/.firebase

android/app/build.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ if (flutterVersionName == null) {
2222
}
2323

2424
apply plugin: 'com.android.application'
25+
// START: FlutterFire Configuration
26+
apply plugin: 'com.google.gms.google-services'
27+
// END: FlutterFire Configuration
2528
apply plugin: 'kotlin-android'
2629
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2730

android/app/google-services.json

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"project_info": {
3+
"project_number": "601686189968",
4+
"project_id": "mcgamejam-temporary",
5+
"storage_bucket": "mcgamejam-temporary.appspot.com"
6+
},
7+
"client": [
8+
{
9+
"client_info": {
10+
"mobilesdk_app_id": "1:601686189968:android:e087ad002c86740691f515",
11+
"android_client_info": {
12+
"package_name": "com.example.mcgamejam_website"
13+
}
14+
},
15+
"oauth_client": [
16+
{
17+
"client_id": "601686189968-hdk0g85hlatspp8ipfhgsp1bboum7e0h.apps.googleusercontent.com",
18+
"client_type": 3
19+
}
20+
],
21+
"api_key": [
22+
{
23+
"current_key": "AIzaSyCjAKFlduek_OC62CHg12wBfzPwG2XvKHw"
24+
}
25+
],
26+
"services": {
27+
"appinvite_service": {
28+
"other_platform_oauth_client": [
29+
{
30+
"client_id": "601686189968-hdk0g85hlatspp8ipfhgsp1bboum7e0h.apps.googleusercontent.com",
31+
"client_type": 3
32+
}
33+
]
34+
}
35+
}
36+
}
37+
],
38+
"configuration_version": "1"
39+
}

android/build.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ buildscript {
77

88
dependencies {
99
classpath 'com.android.tools.build:gradle:7.1.2'
10+
// START: FlutterFire Configuration
11+
classpath 'com.google.gms:google-services:4.3.10'
12+
// END: FlutterFire Configuration
1013
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1114
}
1215
}

firebase.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"hosting": {
3+
"source": ".",
4+
"ignore": [
5+
"firebase.json",
6+
"**/.*",
7+
"**/node_modules/**"
8+
],
9+
"frameworksBackend": {
10+
"region": "us-central1"
11+
}
12+
}
13+
}

ios/Flutter/Debug.xcconfig

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "Generated.xcconfig"

ios/Flutter/Release.xcconfig

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "Generated.xcconfig"

ios/Podfile

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Uncomment this line to define a global platform for your project
2+
# platform :ios, '11.0'
3+
4+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6+
7+
project 'Runner', {
8+
'Debug' => :debug,
9+
'Profile' => :release,
10+
'Release' => :release,
11+
}
12+
13+
def flutter_root
14+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15+
unless File.exist?(generated_xcode_build_settings_path)
16+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17+
end
18+
19+
File.foreach(generated_xcode_build_settings_path) do |line|
20+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
21+
return matches[1].strip if matches
22+
end
23+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24+
end
25+
26+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27+
28+
flutter_ios_podfile_setup
29+
30+
target 'Runner' do
31+
use_frameworks!
32+
use_modular_headers!
33+
34+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35+
end
36+
37+
post_install do |installer|
38+
installer.pods_project.targets.each do |target|
39+
flutter_additional_ios_build_settings(target)
40+
end
41+
end

ios/Runner/GoogleService-Info.plist

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CLIENT_ID</key>
6+
<string>601686189968-ekgnfuceme60884qlu02fcgg1lqfm9t9.apps.googleusercontent.com</string>
7+
<key>REVERSED_CLIENT_ID</key>
8+
<string>com.googleusercontent.apps.601686189968-ekgnfuceme60884qlu02fcgg1lqfm9t9</string>
9+
<key>API_KEY</key>
10+
<string>AIzaSyD_nyoFEBV_4qonXvDOV329PlpqgEsNisM</string>
11+
<key>GCM_SENDER_ID</key>
12+
<string>601686189968</string>
13+
<key>PLIST_VERSION</key>
14+
<string>1</string>
15+
<key>BUNDLE_ID</key>
16+
<string>com.example.mcgamejamWebsite</string>
17+
<key>PROJECT_ID</key>
18+
<string>mcgamejam-temporary</string>
19+
<key>STORAGE_BUCKET</key>
20+
<string>mcgamejam-temporary.appspot.com</string>
21+
<key>IS_ADS_ENABLED</key>
22+
<false></false>
23+
<key>IS_ANALYTICS_ENABLED</key>
24+
<false></false>
25+
<key>IS_APPINVITE_ENABLED</key>
26+
<true></true>
27+
<key>IS_GCM_ENABLED</key>
28+
<true></true>
29+
<key>IS_SIGNIN_ENABLED</key>
30+
<true></true>
31+
<key>GOOGLE_APP_ID</key>
32+
<string>1:601686189968:ios:a1ce593d1a2ca20f91f515</string>
33+
</dict>
34+
</plist>

ios/firebase_app_id_file.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"file_generated_by": "FlutterFire CLI",
3+
"purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
4+
"GOOGLE_APP_ID": "1:601686189968:ios:a1ce593d1a2ca20f91f515",
5+
"FIREBASE_PROJECT_ID": "mcgamejam-temporary",
6+
"GCM_SENDER_ID": "601686189968"
7+
}

lib/firebase_options.dart

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// File generated by FlutterFire CLI.
2+
// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
3+
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
4+
import 'package:flutter/foundation.dart'
5+
show defaultTargetPlatform, kIsWeb, TargetPlatform;
6+
7+
/// Default [FirebaseOptions] for use with your Firebase apps.
8+
///
9+
/// Example:
10+
/// ```dart
11+
/// import 'firebase_options.dart';
12+
/// // ...
13+
/// await Firebase.initializeApp(
14+
/// options: DefaultFirebaseOptions.currentPlatform,
15+
/// );
16+
/// ```
17+
class DefaultFirebaseOptions {
18+
static FirebaseOptions get currentPlatform {
19+
if (kIsWeb) {
20+
return web;
21+
}
22+
switch (defaultTargetPlatform) {
23+
case TargetPlatform.android:
24+
throw UnsupportedError(
25+
'DefaultFirebaseOptions have not been configured for android - '
26+
'you can reconfigure this by running the FlutterFire CLI again.',
27+
);
28+
case TargetPlatform.iOS:
29+
throw UnsupportedError(
30+
'DefaultFirebaseOptions have not been configured for ios - '
31+
'you can reconfigure this by running the FlutterFire CLI again.',
32+
);
33+
case TargetPlatform.macOS:
34+
throw UnsupportedError(
35+
'DefaultFirebaseOptions have not been configured for macos - '
36+
'you can reconfigure this by running the FlutterFire CLI again.',
37+
);
38+
case TargetPlatform.windows:
39+
throw UnsupportedError(
40+
'DefaultFirebaseOptions have not been configured for windows - '
41+
'you can reconfigure this by running the FlutterFire CLI again.',
42+
);
43+
case TargetPlatform.linux:
44+
throw UnsupportedError(
45+
'DefaultFirebaseOptions have not been configured for linux - '
46+
'you can reconfigure this by running the FlutterFire CLI again.',
47+
);
48+
default:
49+
throw UnsupportedError(
50+
'DefaultFirebaseOptions are not supported for this platform.',
51+
);
52+
}
53+
}
54+
55+
static const FirebaseOptions web = FirebaseOptions(
56+
apiKey: 'AIzaSyCZ_IsPq6f2zFfa4m3FZTI7_IZah3jprYA',
57+
appId: '1:601686189968:web:bfb96e28481162ec91f515',
58+
messagingSenderId: '601686189968',
59+
projectId: 'mcgamejam-temporary',
60+
authDomain: 'mcgamejam-temporary.firebaseapp.com',
61+
storageBucket: 'mcgamejam-temporary.appspot.com',
62+
measurementId: 'G-14B9ZWV5B5',
63+
);
64+
}

macos/Flutter/Flutter-Debug.xcconfig

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "ephemeral/Flutter-Generated.xcconfig"
+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "ephemeral/Flutter-Generated.xcconfig"

macos/Flutter/GeneratedPluginRegistrant.swift

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import FlutterMacOS
66
import Foundation
77

8+
import firebase_core
89

910
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
11+
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
1012
}

macos/Podfile

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
platform :osx, '10.11'
2+
3+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5+
6+
project 'Runner', {
7+
'Debug' => :debug,
8+
'Profile' => :release,
9+
'Release' => :release,
10+
}
11+
12+
def flutter_root
13+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14+
unless File.exist?(generated_xcode_build_settings_path)
15+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16+
end
17+
18+
File.foreach(generated_xcode_build_settings_path) do |line|
19+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
20+
return matches[1].strip if matches
21+
end
22+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23+
end
24+
25+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26+
27+
flutter_macos_podfile_setup
28+
29+
target 'Runner' do
30+
use_frameworks!
31+
use_modular_headers!
32+
33+
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34+
end
35+
36+
post_install do |installer|
37+
installer.pods_project.targets.each do |target|
38+
flutter_additional_macos_build_settings(target)
39+
end
40+
end

macos/firebase_app_id_file.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"file_generated_by": "FlutterFire CLI",
3+
"purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
4+
"GOOGLE_APP_ID": "1:601686189968:ios:a1ce593d1a2ca20f91f515",
5+
"FIREBASE_PROJECT_ID": "mcgamejam-temporary",
6+
"GCM_SENDER_ID": "601686189968"
7+
}

pubspec.lock

+41
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,27 @@ packages:
5757
url: "https://pub.dartlang.org"
5858
source: hosted
5959
version: "2.0.2"
60+
firebase_core:
61+
dependency: "direct main"
62+
description:
63+
name: firebase_core
64+
url: "https://pub.dartlang.org"
65+
source: hosted
66+
version: "2.15.0"
67+
firebase_core_platform_interface:
68+
dependency: transitive
69+
description:
70+
name: firebase_core_platform_interface
71+
url: "https://pub.dartlang.org"
72+
source: hosted
73+
version: "4.8.0"
74+
firebase_core_web:
75+
dependency: transitive
76+
description:
77+
name: firebase_core_web
78+
url: "https://pub.dartlang.org"
79+
source: hosted
80+
version: "2.6.0"
6081
flutter:
6182
dependency: "direct main"
6283
description: flutter
@@ -79,13 +100,25 @@ packages:
79100
description: flutter
80101
source: sdk
81102
version: "0.0.0"
103+
flutter_web_plugins:
104+
dependency: transitive
105+
description: flutter
106+
source: sdk
107+
version: "0.0.0"
82108
intl:
83109
dependency: "direct main"
84110
description:
85111
name: intl
86112
url: "https://pub.dartlang.org"
87113
source: hosted
88114
version: "0.17.0"
115+
js:
116+
dependency: transitive
117+
description:
118+
name: js
119+
url: "https://pub.dartlang.org"
120+
source: hosted
121+
version: "0.6.4"
89122
lints:
90123
dependency: transitive
91124
description:
@@ -121,6 +154,13 @@ packages:
121154
url: "https://pub.dartlang.org"
122155
source: hosted
123156
version: "1.8.2"
157+
plugin_platform_interface:
158+
dependency: transitive
159+
description:
160+
name: plugin_platform_interface
161+
url: "https://pub.dartlang.org"
162+
source: hosted
163+
version: "2.1.5"
124164
sky_engine:
125165
dependency: transitive
126166
description: flutter
@@ -177,3 +217,4 @@ packages:
177217
version: "2.1.2"
178218
sdks:
179219
dart: ">=2.18.2 <3.0.0"
220+
flutter: ">=3.3.0"

pubspec.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ dependencies:
4040
sdk: flutter
4141
intl: any
4242
ffi: ^2.0.2
43+
firebase_core: ^2.15.0
4344

4445
dev_dependencies:
4546
flutter_test:

0 commit comments

Comments
 (0)