mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-04-03 16:10:41 +00:00
use firebase mocks to setup the repo
This commit is contained in:
parent
d95b811d6c
commit
1d1621bcb3
4 changed files with 50 additions and 13 deletions
4
scripts/mocks/mock_constants.dart
Normal file
4
scripts/mocks/mock_constants.dart
Normal file
|
@ -0,0 +1,4 @@
|
|||
const String contactEmail = '';
|
||||
const String iapServerUrl = '';
|
||||
const String issuesReportUrl = 'https://github.com/vodemn/m3_lightmeter/issues/new/choose';
|
||||
const String sourceCodeUrl = 'https://github.com/vodemn/m3_lightmeter/';
|
30
scripts/mocks/mock_firebase.json
Normal file
30
scripts/mocks/mock_firebase.json
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"flutter": {
|
||||
"platforms": {
|
||||
"android": {
|
||||
"default": {
|
||||
"projectId": "mockproject-1234",
|
||||
"appId": "1:123456789000:android:f1bf012572b04063",
|
||||
"fileOutput": "android/app/google-services.json"
|
||||
}
|
||||
},
|
||||
"ios": {
|
||||
"default": {
|
||||
"projectId": "mockproject-1234",
|
||||
"appId": "1:123456789000:ios:f1bf012572b04063",
|
||||
"uploadDebugSymbols": true,
|
||||
"fileOutput": "ios/Runner/GoogleService-Info.plist"
|
||||
}
|
||||
},
|
||||
"dart": {
|
||||
"lib/firebase_options.dart": {
|
||||
"projectId": "mockproject-1234",
|
||||
"configurations": {
|
||||
"android": "1:123456789000:android:f1bf012572b04063",
|
||||
"ios": "1:123456789000:ios:f1bf012572b04063"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
scripts/mocks/mock_firebase_options.dart
Normal file
7
scripts/mocks/mock_firebase_options.dart
Normal file
|
@ -0,0 +1,7 @@
|
|||
// ignore_for_file: type=lint
|
||||
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
|
||||
|
||||
class DefaultFirebaseOptions {
|
||||
static FirebaseOptions get currentPlatform =>
|
||||
FirebaseOptions(apiKey: '', appId: '', messagingSenderId: '', projectId: '');
|
||||
}
|
|
@ -1,16 +1,12 @@
|
|||
constants="const String contactEmail = '';
|
||||
const String iapServerUrl = '';
|
||||
const String issuesReportUrl = 'https://github.com/vodemn/m3_lightmeter/issues/new/choose';
|
||||
const String sourceCodeUrl = 'https://github.com/vodemn/m3_lightmeter/';"
|
||||
cp "scripts/mocks/mock_constants.dart" "lib/constants.dart"
|
||||
cp "scripts/mocks/mock_firebase_options.dart" "lib/firebase_options.dart"
|
||||
cp "scripts/mocks/mock_firebase.json" "firebase.json"
|
||||
|
||||
firebase_options="// ignore_for_file: type=lint
|
||||
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
|
||||
curl -H 'Accept: application/vnd.github.v3.raw' \
|
||||
-o "android/app/google-services.json" \
|
||||
-L "https://api.github.com/repos/firebase/quickstart-android/contents/mock-google-services.json"
|
||||
curl -H 'Accept: application/vnd.github.v3.raw' \
|
||||
-o "ios/Runner/GoogleService-Info.plist" \
|
||||
-L "https://api.github.com/repos/firebase/quickstart-ios/contents/mock-GoogleService-Info.plist"
|
||||
|
||||
class DefaultFirebaseOptions {
|
||||
static FirebaseOptions get currentPlatform =>
|
||||
FirebaseOptions(apiKey: '', appId: '', messagingSenderId: '', projectId: '');
|
||||
}"
|
||||
|
||||
echo "$constants" > "lib/constants.dart"
|
||||
echo "$firebase_options" > "lib/firebase_options.dart"
|
||||
sh .github/scripts/stub_iap.sh
|
||||
|
|
Loading…
Reference in a new issue