Skip to content

Commit

Permalink
build: Set olm to 1.3.2 to fix android build
Browse files Browse the repository at this point in the history
  • Loading branch information
krille-chan committed Dec 1, 2023
1 parent f1b2040 commit 615e712
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -636,10 +636,10 @@ packages:
dependency: "direct main"
description:
name: flutter_olm
sha256: ea8da4b76b5005b1df80ff5afd705ba17a9e2db5ac8848512d3455a88b56fb67
sha256: "69aaac45d854e74d17d04dac8a0ca3f548266d271a0f0fa7600e006e81432417"
url: "https://pub.dev"
source: hosted
version: "1.4.0"
version: "1.3.2"
flutter_openssl_crypto:
dependency: "direct main"
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies:
sdk: flutter
flutter_map: ^4.0.0
flutter_math_fork: ^0.7.2
flutter_olm: ^1.4.0
flutter_olm: 1.3.2 # Keep in sync with scripts/prepare-web.sh ! 1.4.0 does currently not build on Android
flutter_openssl_crypto: ^0.3.0
flutter_ringtone_player: ^4.0.0+2
flutter_secure_storage: ^9.0.0
Expand Down
6 changes: 5 additions & 1 deletion scripts/prepare-web.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/sh -ve
rm -r assets/js/package
cd assets/js/ && curl -L $(curl -s 'https://api.github.com/repos/famedly/olm/releases' | jq -r '.[0] | .assets | .[0] | .browser_download_url') > olm.zip && cd ../../

OLM_VERSION=$(cat pubspec.yaml | yq .dependencies.flutter_olm)
DOWNLOAD_PATH="https://github.com/famedly/olm/releases/download/v$OLM_VERSION/olm.zip"

cd assets/js/ && curl -L $DOWNLOAD_PATH > olm.zip && cd ../../
cd assets/js/ && unzip olm.zip && cd ../../
cd assets/js/ && rm olm.zip && cd ../../
cd assets/js/ && mv javascript package && cd ../../

0 comments on commit 615e712

Please sign in to comment.