Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Migrate image_compare #75

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions components/shared/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ dependencies:
path: ^1.8.3

dev_dependencies:
image_compare: ^1.1.2
image_compare:
# TODO: Use upstream version when https://github.com/nitinramadoss/image_compare/pull/10 is merged
git:
url: https://github.com/838/image_compare
ref: upgrade/deps
lints: ^2.0.1
test: ^1.22.2

dependency_overrides:
image: ^4.0.11
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MockCoverService extends CoverService {
void main() async {
File cover = File("test_resources/publication/services/cover.jpg");
Uint8List coverBytes = (await cover.readAsBytes());
Image? coverBitmap = readJpg(coverBytes);
Image? coverBitmap = decodeJpg(coverBytes);
String coverPath = cover.path;

Publication publication = Publication(
Expand Down
15 changes: 1 addition & 14 deletions rec_clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,4 @@
# Unauthorized copying of this file, via any medium is strictly prohibited.
# Proprietary and confidential.

folders=("components/commons"
"components/lcp"
"components/navigator"
"components/opds"
"components/server"
"components/shared"
"components/streamer"
"reader_widget"
"demo-app"
)
for i in "${folders[@]}"; do
echo "flutter clean $i"
(cd "$i" || exit; flutter clean)
done
./rec_flutter.sh clean
21 changes: 21 additions & 0 deletions rec_flutter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# Copyright (c) 2022 Mantano. All rights reserved.
# Unauthorized copying of this file, via any medium is strictly prohibited.
# Proprietary and confidential.

folders=(
"components/commons"
"components/shared"
"components/webview"
"components/server"
"components/streamer"
"components/opds"
"components/navigator"
"components/lcp"
"reader_widget"
"demo-app"
)
for i in "${folders[@]}"; do
echo "flutter $@ $i"
(cd "$i" || exit; flutter $@)
done
17 changes: 1 addition & 16 deletions rec_pub_get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,4 @@
# Unauthorized copying of this file, via any medium is strictly prohibited.
# Proprietary and confidential.

folders=(
"components/commons"
"components/shared"
"components/webview"
"components/server"
"components/streamer"
"components/opds"
"components/navigator"
"components/lcp"
"reader_widget"
"demo-app"
)
for i in "${folders[@]}"; do
echo "flutter pub get $i"
(cd "$i" || exit; flutter pub get)
done
./rec_flutter.sh pub get
6 changes: 6 additions & 0 deletions rec_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
# Copyright (c) 2022 Mantano. All rights reserved.
# Unauthorized copying of this file, via any medium is strictly prohibited.
# Proprietary and confidential.

./rec_flutter.sh test