Skip to content

Commit

Permalink
Merge branch 'main' into feature/widgetbook-preview-to-gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Matej-Hlatky committed Jul 31, 2024
2 parents b1b78de + 83dbbef commit 88f1c3d
Show file tree
Hide file tree
Showing 40 changed files with 613 additions and 271 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/android_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ jobs:
uses: actions/checkout@v4
with:
repository: slovensko-digital/eidmsdk-flutter
token: ${{ secrets.GH_PAT }}
path: eidmsdk_flutter

- name: Checkout "autogram_sign"
uses: actions/checkout@v4
with:
repository: slovensko-digital/avm-client-dart
token: ${{ secrets.GH_PAT }}
path: autogram_sign

- uses: actions/setup-java@v1
Expand All @@ -64,21 +62,38 @@ jobs:
working-directory: ./app
run: echo $ENCODED_STRING | base64 -d > release_keystore.jks

- name: Build
- name: Build Googla Play .aab
env:
AVM_KEYSTORE_FILE: ../../release_keystore.jks
AVM_KEYSTORE_PASSWORD: ${{ secrets.GOOGLE_RELEASE_KEYSTORE_PASSWORD }}
AVM_KEY_ALIAS: ${{ secrets.GOOGLE_RELEASE_KEYSTORE_ALIAS }}
AVM_KEY_PASSWORD: ${{ secrets.GOOGLE_RELEASE_KEY_PASSWORD }}
EIDMSDK_ACCESS_TOKEN: ${{ secrets.GH_PAT }}
working-directory: ./app
run: flutter build appbundle --release

- name: Upload Release Build to Artifacts
- name: Build Andorid .apk
env:
AVM_KEYSTORE_FILE: ../../release_keystore.jks
AVM_KEYSTORE_PASSWORD: ${{ secrets.GOOGLE_RELEASE_KEYSTORE_PASSWORD }}
AVM_KEY_ALIAS: ${{ secrets.GOOGLE_RELEASE_KEYSTORE_ALIAS }}
AVM_KEY_PASSWORD: ${{ secrets.GOOGLE_RELEASE_KEY_PASSWORD }}
EIDMSDK_ACCESS_TOKEN: ${{ secrets.GH_PAT }}
working-directory: ./app
run: flutter build apk --release

- name: Upload .aab Build to Artifacts
uses: actions/upload-artifact@v3
with:
name: release-artifacts
path: ./app/build/app/outputs/bundle/release/app-release.aab

- name: Upload .apk Build to Artifacts
uses: actions/upload-artifact@v3
with:
name: release-artifacts
path: ./app/build/app/outputs/apk/release/app-release.apk

- name: Create release if tag pushed
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -89,3 +104,4 @@ jobs:
prerelease: true
files: |
./app/build/app/outputs/bundle/release/app-release.aab
./app/build/app/outputs/apk/release/app-release.apk
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# Changelog

## NEXT - v1.0.2(33)
## 2024-07-16 - v1.0.3(34)

- #30 | Logging into Crashlytics
- #16 | Fix iOS URL domain association

## 2024-06-30 - v1.0.2(33)

- Refactor Settings model
- Refactor Settings model
- #18 | Allow sharing signed Document even when failed to save file
- #26 | About screen - add links into "about" text
- #26 | About screen - fix vertical content overflow on smaller screens

## 2024-06-17 - v1.0.1(1)

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ fvm dart run build_runner build --delete-conflicting-outputs

Build **Android** APK:

eid-mSDK binaries are hosted on GitHub package registry. To access the package during build process environment variable `EIDMSDK_ACCESS_TOKEN` needs to be set to a GitHub Personal Access Token that has permission to read package registry.

```shell
fvm flutter build apk
```
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ allprojects {
url = "https://maven.pkg.github.com/eIDmSDK/eID-mSDK-Android/"
credentials {
username = "eIDmSDK"
password = "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"
password = System.getenv("EIDMSDK_ACCESS_TOKEN")
}
}
}
Expand Down
67 changes: 67 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,23 @@ PODS:
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30911.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleMLKit/BarcodeScanning (4.0.0):
- GoogleMLKit/MLKitCore
- MLKitBarcodeScanning (~> 3.0.0)
- GoogleMLKit/MLKitCore (4.0.0):
- MLKitCommon (~> 9.0.0)
- GoogleToolboxForMac/DebugUtils (2.3.2):
- GoogleToolboxForMac/Defines (= 2.3.2)
- GoogleToolboxForMac/Defines (2.3.2)
- GoogleToolboxForMac/Logger (2.3.2):
- GoogleToolboxForMac/Defines (= 2.3.2)
- "GoogleToolboxForMac/NSData+zlib (2.3.2)":
- GoogleToolboxForMac/Defines (= 2.3.2)
- "GoogleToolboxForMac/NSDictionary+URLArguments (2.3.2)":
- GoogleToolboxForMac/DebugUtils (= 2.3.2)
- GoogleToolboxForMac/Defines (= 2.3.2)
- "GoogleToolboxForMac/NSString+URLArguments (= 2.3.2)"
- "GoogleToolboxForMac/NSString+URLArguments (2.3.2)"
- GoogleUtilities/Environment (7.13.0):
- GoogleUtilities/Privacy
- PromisesObjC (< 3.0, >= 1.2)
Expand All @@ -96,8 +113,32 @@ PODS:
- GoogleUtilities/UserDefaults (7.13.0):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GoogleUtilitiesComponents (1.1.0):
- GoogleUtilities/Logger
- GTMSessionFetcher/Core (2.3.0)
- JWTDecode (3.1.0)
- lottie-ios (4.4.0)
- MLImage (1.0.0-beta4)
- MLKitBarcodeScanning (3.0.0):
- MLKitCommon (~> 9.0)
- MLKitVision (~> 5.0)
- MLKitCommon (9.0.0):
- GoogleDataTransport (~> 9.0)
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)"
- GoogleUtilities/UserDefaults (~> 7.0)
- GoogleUtilitiesComponents (~> 1.0)
- GTMSessionFetcher/Core (< 3.0, >= 1.1)
- MLKitVision (5.0.0):
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- GTMSessionFetcher/Core (< 3.0, >= 1.1)
- MLImage (= 1.0.0-beta4)
- MLKitCommon (~> 9.0)
- mobile_scanner (3.5.6):
- Flutter
- GoogleMLKit/BarcodeScanning (~> 4.0.0)
- nanopb (2.30910.0):
- nanopb/decode (= 2.30910.0)
- nanopb/encode (= 2.30910.0)
Expand Down Expand Up @@ -125,6 +166,8 @@ PODS:
- SwiftyGif (5.4.4)
- url_launcher_ios (0.0.1):
- Flutter
- wakelock_plus (0.0.1):
- Flutter
- webview_flutter_wkwebview (0.0.1):
- Flutter

Expand All @@ -134,12 +177,14 @@ DEPENDENCIES:
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`)
- Flutter (from `Flutter`)
- mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- printing (from `.symlinks/plugins/printing/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)

SPEC REPOS:
Expand All @@ -154,9 +199,17 @@ SPEC REPOS:
- FirebaseInstallations
- FirebaseSessions
- GoogleDataTransport
- GoogleMLKit
- GoogleToolboxForMac
- GoogleUtilities
- GoogleUtilitiesComponents
- GTMSessionFetcher
- JWTDecode
- lottie-ios
- MLImage
- MLKitBarcodeScanning
- MLKitCommon
- MLKitVision
- nanopb
- OpenSSL-Universal
- PromisesObjC
Expand All @@ -175,6 +228,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/firebase_crashlytics/ios"
Flutter:
:path: Flutter
mobile_scanner:
:path: ".symlinks/plugins/mobile_scanner/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
Expand All @@ -187,6 +242,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
wakelock_plus:
:path: ".symlinks/plugins/wakelock_plus/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"

Expand All @@ -206,9 +263,18 @@ SPEC CHECKSUMS:
FirebaseSessions: 2651b464e241c93fd44112f995d5ab663c970487
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
GoogleMLKit: 2bd0dc6253c4d4f227aad460f69215a504b2980e
GoogleToolboxForMac: 8bef7c7c5cf7291c687cf5354f39f9db6399ad34
GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152
GoogleUtilitiesComponents: 679b2c881db3b615a2777504623df6122dd20afe
GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2
JWTDecode: 3eaab1e06b6f4dcbdd6716aff09ba4c2104ca8b7
lottie-ios: ef1be1f90d54255f08e09d767950e43714661178
MLImage: 7bb7c4264164ade9bf64f679b40fb29c8f33ee9b
MLKitBarcodeScanning: 04e264482c5f3810cb89ebc134ef6b61e67db505
MLKitCommon: c1b791c3e667091918d91bda4bba69a91011e390
MLKitVision: 8baa5f46ee3352614169b85250574fde38c36f49
mobile_scanner: 38dcd8a49d7d485f632b7de65e4900010187aef2
nanopb: 438bc412db1928dac798aa6fd75726007be04262
OpenSSL-Universal: 6e1ae0555546e604dbc632a2b9a24a9c46c41ef6
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
Expand All @@ -221,6 +287,7 @@ SPEC CHECKSUMS:
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812
wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47
webview_flutter_wkwebview: 4f3e50f7273d31e5500066ed267e3ae4309c5ae4

PODFILE CHECKSUM: a57f30d18f102dd3ce366b1d62a55ecbef2158e5
Expand Down
4 changes: 4 additions & 0 deletions ios/Runner/Runner.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:autogram.slovensko.digital</string>
</array>
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
Expand Down
26 changes: 14 additions & 12 deletions lib/app_navigator_observer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ class AppNavigatorObserver extends NavigatorObserver {

@override
void didPush(Route route, Route? previousRoute) {
_log("Did push", {'route': route, 'previousRoute': previousRoute});
_log("didPush", {'route': route, 'previousRoute': previousRoute});
}

@override
void didPop(Route route, Route? previousRoute) {
_log("Did pop", {'route': route, 'previousRoute': previousRoute});
_log("didPop", {'route': route, 'previousRoute': previousRoute});
}

@override
void didRemove(Route route, Route? previousRoute) {
_log("Did remove", {'route': route, 'previousRoute': previousRoute});
_log("didRemove", {'route': route, 'previousRoute': previousRoute});
}

@override
void didReplace({Route? newRoute, Route? oldRoute}) {
_log("Did replace", {'newRoute': newRoute, 'oldRoute': oldRoute});
_log("didReplace", {'newRoute': newRoute, 'oldRoute': oldRoute});
}

/// Logs navigation event.
Expand All @@ -32,22 +32,24 @@ class AppNavigatorObserver extends NavigatorObserver {
.map((param) => "$param: ${routes[param]?.debug}")
.join(", ");

_logger.info("$event - $params");
_logger.info("$event($params)");
}
}

extension _RouteExtensions<T> on Route<T> {
/// Returns debug string for this [Route].
String? get debug {
final route = this;
final name = settings.name;

if (route is! MaterialPageRoute) {
return route.settings.name;
}
if (name != null && name.isNotEmpty) {
return name;
} else if (this is MaterialPageRoute) {
final text = (this as MaterialPageRoute?)?.builder.runtimeType.toString();

final text = (route as MaterialPageRoute).builder.runtimeType.toString();
// "(BuildContext) => NameScreen"
return text?.replaceFirst("(BuildContext) => ", "");
}

// "(BuildContext) => NameScreen"
return text.replaceFirst("(BuildContext) => ", "");
return null;
}
}
2 changes: 1 addition & 1 deletion lib/app_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:injectable/injectable.dart';
import 'package:logging/logging.dart' show Logger;
import 'package:path_provider/path_provider.dart' as provider;

import 'file_extensions.dart';
import 'file_system_entity_extensions.dart';

/// Provides platform (iOS and Android) specific app functions:
///
Expand Down
4 changes: 2 additions & 2 deletions lib/bloc/create_document_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:injectable/injectable.dart';
import 'package:logging/logging.dart';

import '../data/pdf_signing_option.dart';
import '../file_extensions.dart';
import '../file_system_entity_extensions.dart';
import '../files.dart';
import '../ui/screens/open_document_screen.dart';
import 'create_document_state.dart';
Expand All @@ -22,7 +22,7 @@ export 'create_document_state.dart';
/// - [PreviewDocumentCubit]
@injectable
class CreateDocumentCubit extends Cubit<CreateDocumentState> {
static final _log = Logger("CreateDocumentCubit");
static final _log = Logger((CreateDocumentCubit).toString());

final IAutogramService _service;
final FutureOr<File> _file;
Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/paired_device_list_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export 'paired_device_list_state.dart';
/// Cubit for the [PairedDeviceListScreen] with only [load] function.
@injectable
class PairedDeviceListCubit extends Cubit<PairedDeviceListState> {
static final _log = Logger("PairedDeviceListScreen");
static final _log = Logger((PairedDeviceListScreen).toString());

// ignore: unused_field
final IAutogramService _service;
Expand Down
Loading

0 comments on commit 88f1c3d

Please sign in to comment.