mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-07-06 14:10:41 +00:00
Compare commits
No commits in common. "0e45d9806053ee30820826cc83f937c769404c5b" and "2dee63e78e5a52c7e07f6dca9f8302e79a36cb91" have entirely different histories.
0e45d98060
...
2dee63e78e
8 changed files with 35 additions and 61 deletions
41
README.md
41
README.md
|
@ -38,17 +38,40 @@ To build this app you need to install Flutter 3.24.5 stable. [How to install](ht
|
||||||
|
|
||||||
### 2. Project setup
|
### 2. Project setup
|
||||||
|
|
||||||
#### Restore git-ignored files:
|
#### Restore _constants.dart_ file
|
||||||
|
|
||||||
For macOS you can just run the following script:
|
Create a file _lib/constants.dart_ and paste the following content:
|
||||||
|
|
||||||
```console
|
```dart
|
||||||
sh scripts/setup_fork.sh
|
const String contactEmail = '';
|
||||||
|
const String iapServerUrl = '';
|
||||||
|
const String issuesReportUrl = '';
|
||||||
|
const String sourceCodeUrl = '';
|
||||||
```
|
```
|
||||||
|
|
||||||
Or create the files manually using the contents from the script.
|
#### Stub IAP package
|
||||||
|
|
||||||
#### Get dependencies
|
As part of the app's functionallity is in the private repo, you have to replace these lines in _pubspec.yaml_:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
m3_lightmeter_iap:
|
||||||
|
git:
|
||||||
|
url: "https://github.com/vodemn/m3_lightmeter_iap"
|
||||||
|
ref: main
|
||||||
|
```
|
||||||
|
|
||||||
|
with these:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
m3_lightmeter_iap:
|
||||||
|
path: iap
|
||||||
|
```
|
||||||
|
|
||||||
|
You can do it simply by running the script:
|
||||||
|
|
||||||
|
```console
|
||||||
|
sh .github/scripts/stub_iap.sh
|
||||||
|
```
|
||||||
|
|
||||||
> If you are using VSCode, you can open the workspace like so: _File -> Open Workspace from File -> m3_lightmeter.code-workspace_. Otherwise you have to run `flutter pub get` command from the iap folder.
|
> If you are using VSCode, you can open the workspace like so: _File -> Open Workspace from File -> m3_lightmeter.code-workspace_. Otherwise you have to run `flutter pub get` command from the iap folder.
|
||||||
|
|
||||||
|
@ -59,7 +82,11 @@ flutter pub get
|
||||||
flutter pub run intl_utils:generate
|
flutter pub run intl_utils:generate
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Build
|
### 3. (Optional) Install Firebase
|
||||||
|
|
||||||
|
Out of the box Firebase Crashlytics won't work. If you want to add Crashlytics to your local build please follow [this guide](https://firebase.google.com/docs/flutter/setup).
|
||||||
|
|
||||||
|
### 4. Build
|
||||||
|
|
||||||
- Checkout [Build .apk](.github/workflows/build_apk.yml) workflow for Android
|
- Checkout [Build .apk](.github/workflows/build_apk.yml) workflow for Android
|
||||||
- Checkout [Build .ipa](.github/workflows/build_ipa.yml) workflow for iOS
|
- Checkout [Build .ipa](.github/workflows/build_ipa.yml) workflow for iOS
|
||||||
|
|
|
@ -132,7 +132,7 @@ class _ProFeaturesOverlay extends StatelessWidget {
|
||||||
);
|
);
|
||||||
final bool hasSpotMetering = UserPreferencesProvider.cameraFeatureOf(
|
final bool hasSpotMetering = UserPreferencesProvider.cameraFeatureOf(
|
||||||
context,
|
context,
|
||||||
CameraFeature.spotMetering,
|
CameraFeature.histogram,
|
||||||
);
|
);
|
||||||
return Stack(
|
return Stack(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
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/';
|
|
|
@ -1,30 +0,0 @@
|
||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
// 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,12 +0,0 @@
|
||||||
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"
|
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
sh .github/scripts/stub_iap.sh
|
|
Loading…
Reference in a new issue