Compare commits

..

7 commits

Author SHA1 Message Date
Vadim
a7a8fe2a2e Extract merged native libraries 2023-08-04 13:18:10 +02:00
Vadim
2712df4856 Merge branch 'main' of https://github.com/vodemn/m3_lightmeter into cd 2023-08-04 13:17:55 +02:00
vodemn
6e1aaf5acf Version bump 2023-08-03 20:54:33 +00:00
Vadim
c12cfb1697 Lock & release focus when taking a picture 2023-08-03 22:46:01 +02:00
vodemn
50c2460f16 Version bump 2023-08-01 11:08:55 +00:00
Vadim
6a9036ce5e Camera is taking too long to take a picture 2023-08-01 12:58:43 +02:00
Vadim
40c670ad30
Updated README Build section (#94)
* Update README.md

* Set exact Flutter version for workflows

* Added stub `DefaultFirebaseOptions`

* Fixed `rm`

* Removed `rm`

* Update .gitignore

* Added readable name to ci workflow

* Build -> Development

* Update ci.yml
2023-07-25 17:31:01 +02:00
3 changed files with 52 additions and 9 deletions

View file

@ -142,18 +142,55 @@ jobs:
with:
name: m3_lightmeter_apk
- name: Rename apk
run: mv app-prod-release.apk m3_lightmeter.apk
- uses: ncipollo/release-action@v1.12.0
with:
artifacts: "m3_lightmeter.apk"
skipIfReleaseExists: true
tag: "v${{ github.event.inputs.version }}"
extract-merged-native-libs:
name: Extract merged native libraries
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Download app bundle
uses: actions/download-artifact@v3
with:
name: m3_lightmeter_bundle
- name: Rename artifacts
- name: Extract & zip merged_native_libs
run: |
mv app-prod-release.apk m3_lightmeter.apk
mv app-prod-release.aab m3_lightmeter.aab
unzip app-prod-release.aab
(cd base/lib && zip -r "$OLDPWD/merged_native_libs.zip" .)
- uses: ncipollo/release-action@v1.12.0
- name: Zip app bundle and merged_native_libs
run: zip m3_lightmeter_release.zip app-prod-release.aab merged_native_libs.zip
- name: Upload merged_native_libs.zip to artifacts
uses: actions/upload-artifact@v3
with:
artifacts: "m3_lightmeter.apk, m3_lightmeter.aab"
skipIfReleaseExists: true
tag: "v${{ github.event.inputs.version }}"
name: m3_lightmeter_release
path: m3_lightmeter_release.zip
# TODO: Automate Google Play releases creation
create-google-play-release:
if: false
name: Create Google Play release
needs: [build, extract-merged-native-libs]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Download app bundle
uses: actions/download-artifact@v3
with:
name: m3_lightmeter_bundle

View file

@ -205,7 +205,13 @@ class CameraContainerBloc extends EvSourceBlocBase<CameraContainerEvent, CameraC
Future<double?> _takePhoto() async {
try {
// https://github.com/flutter/flutter/issues/84957#issuecomment-1661155095
await _cameraController!.setFocusMode(FocusMode.locked);
await _cameraController!.setExposureMode(ExposureMode.locked);
final file = await _cameraController!.takePicture();
await _cameraController!.setFocusMode(FocusMode.auto);
await _cameraController!.setExposureMode(ExposureMode.auto);
final Uint8List bytes = await file.readAsBytes();
Directory(file.path).deleteSync(recursive: true);

View file

@ -1,7 +1,7 @@
name: lightmeter
description: A new Flutter project.
publish_to: "none"
version: 0.12.2+33
version: 0.12.4+35
environment:
sdk: ">=3.0.0 <4.0.0"
@ -9,7 +9,7 @@ environment:
dependencies:
app_settings: 4.2.0
bloc_concurrency: 0.2.2
camera: 0.10.5
camera: 0.10.5+2
clipboard: 0.1.3
dynamic_color: 1.6.5
exif: 3.1.4