File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,26 +46,24 @@ parts:
4646 plugin : flutter
4747 flutter-target : lib/main.dart
4848 override-build : |
49+ flutter_dir="$CRAFT_PART_BUILD/flutter-distro"
50+
51+ if [ ! -d "$flutter_dir" ]; then
52+ git clone --depth 1 -b stable https://github.com/flutter/flutter.git "$flutter_dir"
53+ rm -f "$flutter_dir/engine/src/.gn"
54+ fi
55+
56+ export PATH="$flutter_dir/bin:$PATH"
57+
58+ flutter precache --linux
4959 flutter pub get
5060 dart run open_authenticator:compile_svg
5161 dart run build_runner build --delete-conflicting-outputs
5262 dart run slang
5363 dart run open_authenticator:generate
64+ flutter build linux --release --verbose --target lib/main.dart
5465
55- if command -v craftctl >/dev/null 2>&1; then
56- craftctl default
57- elif command -v snapcraftctl >/dev/null 2>&1; then
58- snapcraftctl build
59- elif [ -x /usr/libexec/snapcraft/craftctl ]; then
60- /usr/libexec/snapcraft/craftctl default
61- elif [ -x /usr/libexec/snapcraft/snapcraftctl ]; then
62- /usr/libexec/snapcraft/snapcraftctl build
63- elif [ -x /usr/bin/scriptlet-bin/snapcraftctl ]; then
64- /usr/bin/scriptlet-bin/snapcraftctl build
65- else
66- echo "Could not find craftctl or snapcraftctl." >&2
67- exit 1
68- fi
66+ cp -r build/linux/*/release/bundle/* "$CRAFT_PART_INSTALL/"
6967 build-packages :
7068 - default-jdk-headless
7169 - libcurl4-openssl-dev
You can’t perform that action at this time.
0 commit comments