Skip to content

Commit e21b9d3

Browse files
authored
Merge pull request #2579 from get10101/chore/remove-fvm
chore(ci): Remove fvm
2 parents 521070b + 5c9a2ec commit e21b9d3

23 files changed

+157
-205
lines changed

Diff for: .github/actions/setup-fvm/action.yml

-45
This file was deleted.

Diff for: .github/workflows/android-fastlane.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,13 @@ jobs:
8181
- name: List used Xcode version
8282
run: /usr/bin/xcodebuild -version
8383

84-
- uses: ./.github/actions/setup-fvm
84+
- uses: subosito/flutter-action@v2
8585
with:
86-
fvm_config: ./mobile/.fvmrc
87-
working_dir: ./mobile
86+
flutter-version: ${{ env.FLUTTER_VERSION }}
87+
channel: "stable"
88+
cache: true
89+
cache-key: flutter-${{ env.FLUTTER_VERSION }}
90+
cache-path: ${{ runner.tool_cache }}/flutter
8891

8992
- name: Install just
9093
run: cargo install just --force

Diff for: .github/workflows/ci.yml

+19-14
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
env:
88
CARGO_INCREMENTAL: 0
99
CARGO_TERM_COLOR: always
10+
FLUTTER_VERSION: "3.22.1"
1011

1112
jobs:
1213
formatting-dprint:
@@ -26,10 +27,13 @@ jobs:
2627
- name: Setup rust toolchain
2728
run: rustup show
2829
- uses: Swatinem/[email protected]
29-
- uses: ./.github/actions/setup-fvm
30+
- uses: subosito/flutter-action@v2
3031
with:
31-
fvm_config: ./mobile/.fvmrc
32-
working_dir: ./mobile
32+
flutter-version: ${{ env.FLUTTER_VERSION }}
33+
channel: "stable"
34+
cache: true
35+
cache-key: flutter-${{ env.FLUTTER_VERSION }}
36+
cache-path: ${{ runner.tool_cache }}/flutter
3337
- name: Install FFI bindings
3438
run: just deps-gen
3539
- name: Generate FFI bindings
@@ -90,15 +94,13 @@ jobs:
9094
steps:
9195
- uses: actions/checkout@v3
9296
- uses: extractions/setup-just@v1
93-
- uses: ./.github/actions/setup-fvm
97+
- uses: subosito/flutter-action@v2
9498
with:
95-
fvm_config: ./mobile/.fvmrc
96-
working_dir: ./mobile
97-
98-
- uses: ./.github/actions/setup-fvm
99-
with:
100-
fvm_config: ./webapp/frontend/.fvmrc
101-
working_dir: ./webapp/frontend
99+
flutter-version: ${{ env.FLUTTER_VERSION }}
100+
channel: "stable"
101+
cache: true
102+
cache-key: flutter-${{ env.FLUTTER_VERSION }}
103+
cache-path: ${{ runner.tool_cache }}/flutter
102104
- name: Download Dart mocks directory
103105
uses: actions/download-artifact@v2
104106
with:
@@ -125,10 +127,13 @@ jobs:
125127
- name: Setup rust toolchain
126128
run: rustup show
127129
- uses: Swatinem/[email protected]
128-
- uses: ./.github/actions/setup-fvm
130+
- uses: subosito/flutter-action@v2
129131
with:
130-
fvm_config: ./mobile/.fvmrc
131-
working_dir: ./mobile
132+
flutter-version: ${{ env.FLUTTER_VERSION }}
133+
channel: "stable"
134+
cache: true
135+
cache-key: flutter-${{ env.FLUTTER_VERSION }}
136+
cache-path: ${{ runner.tool_cache }}/flutter
132137
- name: Download Rust generated FFI flutter bindings
133138
uses: actions/download-artifact@v2
134139
with:

Diff for: .github/workflows/docker.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
env:
1212
REGISTRY: ghcr.io
13+
FLUTTER_VERSION: "3.22.1"
1314

1415
jobs:
1516
docker:
@@ -62,10 +63,14 @@ jobs:
6263
- uses: extractions/setup-just@v1
6364
if: matrix.bin == 'webapp'
6465

65-
- uses: ./.github/actions/setup-fvm
66+
- uses: subosito/flutter-action@v2
67+
if: matrix.bin == 'webapp'
6668
with:
67-
fvm_config: ./webapp/frontend/.fvmrc
68-
working_dir: ./webapp/frontend
69+
flutter-version: ${{ env.FLUTTER_VERSION }}
70+
channel: "stable"
71+
cache: true
72+
cache-key: flutter-${{ env.FLUTTER_VERSION }}
73+
cache-path: ${{ runner.tool_cache }}/flutter
6974

7075
- name: build flutter for webapp
7176
if: matrix.bin == 'webapp'

Diff for: .github/workflows/ios-fastlane.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,13 @@ jobs:
101101
- name: List used Xcode version
102102
run: /usr/bin/xcodebuild -version
103103

104-
- uses: ./.github/actions/setup-fvm
104+
- uses: subosito/flutter-action@v2
105105
with:
106-
fvm_config: ./mobile/.fvmrc
107-
working_dir: ./mobile
106+
flutter-version: ${{ env.FLUTTER_VERSION }}
107+
channel: "stable"
108+
cache: true
109+
cache-key: flutter-${{ env.FLUTTER_VERSION }}
110+
cache-path: ${{ runner.tool_cache }}/flutter
108111

109112
- name: Check cocoapods version
110113
run: /usr/local/bin/pod --version

Diff for: .github/workflows/testflight-for-review.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ jobs:
2020
- name: List used Xcode version
2121
run: /usr/bin/xcodebuild -version
2222

23-
- uses: ./.github/actions/setup-fvm
23+
- uses: subosito/flutter-action@v2
2424
with:
25-
fvm_config: ./mobile/.fvmrc
26-
working_dir: ./mobile
25+
flutter-version: ${{ env.FLUTTER_VERSION }}
26+
channel: "stable"
27+
cache: true
28+
cache-key: flutter-${{ env.FLUTTER_VERSION }}
29+
cache-path: ${{ runner.tool_cache }}/flutter
2730

2831
- name: Check cocoapods version
2932
run: /usr/local/bin/pod --version

Diff for: README.md

-13
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
To begin, ensure that you have a working installation of the following items:
1414

1515
- [Docker](https://docs.docker.com/) and docker-compose
16-
- [Flutter Version Manager (FVM)](https://fvm.app/)
1716
- [Rust language](https://rustup.rs/)
1817
- Appropriate [Rust targets](https://rust-lang.github.io/rustup/cross-compilation.html) for cross-compiling to your device
1918
- For Android targets:
@@ -28,18 +27,6 @@ echo "ANDROID_NDK=.." >> ~/.gradle/gradle.properties
2827
- XCode
2928
- Cocoapods
3029

31-
## FVM (Flutter Version Manager)
32-
33-
We use FVM to be able to easily switch between different Flutter versions.
34-
Make sure to install it locally.
35-
Once installed, you can use your favorite flutter commands as before, just add `fvm` before, e.g.
36-
37-
```bash
38-
fvm flutter run
39-
```
40-
41-
You can see whether you have all the sufficient dependencies for your platform by running `flutter doctor`.
42-
4330
## Contributing
4431

4532
We encourage community contributions whether it be a bug fix or an improvement to the documentation.

Diff for: justfile

+21-26
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,12 @@ deps-ios:
5454
cargo install cargo-lipo
5555
rustup target add aarch64-apple-ios x86_64-apple-ios
5656

57-
gen flutter_channel="":
57+
gen:
5858
#!/usr/bin/env bash
5959
set -euxo pipefail
6060
cd mobile
6161

62-
if [ -n "{{flutter_channel}}" ]; then
63-
echo "Flutter channel is set to: {{flutter_channel}}"
64-
fvm spawn {{flutter_channel}} pub get
65-
else
66-
echo "Flutter channel is default"
67-
fvm flutter pub get
68-
fi
62+
flutter pub get
6963

7064
RUST_LOG={{ rust_log_for_frb }} flutter_rust_bridge_codegen \
7165
--rust-input native/src/api.rs \
@@ -90,13 +84,13 @@ android-release:
9084

9185
# Build flutter webapp for cargo run --bin webapp
9286
build-web args="":
93-
cd webapp/frontend && fvm flutter build web {{args}}
87+
cd webapp/frontend && flutter build web {{args}}
9488

9589
build-web-release:
96-
cd webapp/frontend && fvm flutter build web --release
90+
cd webapp/frontend && flutter build web --release
9791

9892
run-web:
99-
cd webapp/frontend && fvm flutter run -d chrome --web-browser-flag "--disable-web-security"
93+
cd webapp/frontend && flutter run -d chrome --web-browser-flag "--disable-web-security"
10094

10195
run-web-backend:
10296
cargo run --bin web
@@ -115,7 +109,7 @@ ios-release:
115109
run args="":
116110
#!/usr/bin/env bash
117111
cd mobile && \
118-
fvm flutter run {{args}} \
112+
flutter run {{args}} \
119113
--dart-define="COMMIT=$(git rev-parse HEAD)" \
120114
--dart-define="BRANCH=$(git rev-parse --abbrev-ref HEAD)" \
121115
--dart-define="REGTEST_FAUCET=http://localhost:8080" \
@@ -126,7 +120,7 @@ run args="":
126120
run-regtest args="":
127121
#!/usr/bin/env bash
128122
cd mobile && \
129-
fvm flutter run {{args}} \
123+
flutter run {{args}} \
130124
--dart-define="COMMIT=$(git rev-parse HEAD)" \
131125
--dart-define="BRANCH=$(git rev-parse --abbrev-ref HEAD)" \
132126
--dart-define="ELECTRS_ENDPOINT={{public_regtest_electrs}}" \
@@ -140,7 +134,7 @@ run-regtest args="":
140134
run-mainnet args="":
141135
#!/usr/bin/env bash
142136
cd mobile && \
143-
fvm flutter run {{args}} \
137+
flutter run {{args}} \
144138
--dart-define="COMMIT=$(git rev-parse HEAD)" \
145139
--dart-define="BRANCH=$(git rev-parse --abbrev-ref HEAD)" \
146140
--dart-define="ELECTRS_ENDPOINT=http://api.10101.finance:3000" \
@@ -155,7 +149,7 @@ run-mainnet args="":
155149
run-regtest-android args="":
156150
#!/usr/bin/env bash
157151
cd mobile && \
158-
fvm flutter run {{args}} \
152+
flutter run {{args}} \
159153
--dart-define="COMMIT=$(git rev-parse HEAD)" \
160154
--dart-define="BRANCH=$(git rev-parse --abbrev-ref HEAD)" \
161155
--dart-define="ELECTRS_ENDPOINT={{public_regtest_electrs}}" \
@@ -172,7 +166,7 @@ run-local-android args="":
172166
LOCAL_IP=$({{get_local_ip}})
173167
echo "Android app will connect to $LOCAL_IP for 10101 services"
174168
cd mobile && \
175-
fvm flutter run {{args}} \
169+
flutter run {{args}} \
176170
--dart-define="COMMIT=$(git rev-parse HEAD)" \
177171
--dart-define="BRANCH=$(git rev-parse --abbrev-ref HEAD)" \
178172
--dart-define="ELECTRS_ENDPOINT=http://${LOCAL_IP}:3000" \
@@ -195,7 +189,7 @@ clean:
195189
set -euxo pipefail
196190
cd mobile
197191
rm -rf mobile/android/app/src/main/jniLibs/*
198-
fvm flutter clean
192+
flutter clean
199193
cd native && cargo clean
200194

201195
# Wipes everything
@@ -282,8 +276,8 @@ cargo-clippy:
282276
cargo clippy --all-targets -- -D warnings
283277

284278
lint-flutter:
285-
cd mobile && fvm flutter analyze --fatal-infos .
286-
cd webapp/frontend && fvm flutter analyze --fatal-infos .
279+
cd mobile && flutter analyze --fatal-infos .
280+
cd webapp/frontend && flutter analyze --fatal-infos .
287281

288282
alias flutter-lint := lint-flutter
289283

@@ -327,7 +321,8 @@ lnd-mock:
327321
cargo run --package lnd-bridge --example mock
328322

329323
flutter-test:
330-
cd mobile && fvm flutter pub run build_runner build --delete-conflicting-outputs && fvm flutter test
324+
cd mobile && flutter pub get
325+
cd mobile && flutter pub run build_runner build --delete-conflicting-outputs && flutter test
331326

332327
# Tests for the `native` crate
333328
native-test:
@@ -520,7 +515,7 @@ build-ipa args="":
520515
args+=(--flavor test)
521516
fi
522517

523-
cd mobile && fvm flutter build ipa "${args[@]}" \
518+
cd mobile && flutter build ipa "${args[@]}" \
524519
--dart-define="ELECTRS_ENDPOINT=${ELECTRS_ENDPOINT}" \
525520
--dart-define="COORDINATOR_P2P_ENDPOINT=${COORDINATOR_P2P_ENDPOINT}" \
526521
--dart-define="NETWORK=${NETWORK}" \
@@ -547,15 +542,15 @@ publish-testflight-fastlane:
547542
release-testflight: gen ios build-ipa publish-testflight
548543

549544
version:
550-
cargo --version && rustc --version && fvm flutter --version
545+
cargo --version && rustc --version && flutter --version
551546

552547
build-apk-regtest:
553548
#!/usr/bin/env bash
554549
BUILD_NAME=$(yq -r .version {{pubspec}})
555550
BUILD_NUMBER=$(git rev-list HEAD --count)
556551
echo "build name: ${BUILD_NAME}"
557552
echo "build number: ${BUILD_NUMBER}"
558-
cd mobile && fvm flutter build apk \
553+
cd mobile && flutter build apk \
559554
--build-name=${BUILD_NAME} \
560555
--build-number=${BUILD_NUMBER} \
561556
--release \
@@ -577,7 +572,7 @@ build-app-bundle-regtest:
577572
BUILD_NUMBER=$(git rev-list HEAD --count)
578573
echo "build name: ${BUILD_NAME}"
579574
echo "build number: ${BUILD_NUMBER}"
580-
cd mobile && fvm flutter build appbundle \
575+
cd mobile && flutter build appbundle \
581576
--build-name=${BUILD_NAME} \
582577
--build-number=${BUILD_NUMBER} \
583578
--release \
@@ -610,7 +605,7 @@ build-android-app-bundle:
610605
os={{os()}}
611606
echo "building on '$os' for '$NETWORK'"
612607

613-
cd mobile && fvm flutter build appbundle \
608+
cd mobile && flutter build appbundle \
614609
--build-name=${BUILD_NAME} \
615610
--build-number=${BUILD_NUMBER} \
616611
--release \
@@ -643,7 +638,7 @@ build-android-app-apk args="":
643638
os={{os()}}
644639
echo "building on '$os' for '$NETWORK'"
645640

646-
cd mobile && fvm flutter build apk {{args}} \
641+
cd mobile && flutter build apk {{args}} \
647642
--build-name=${BUILD_NAME} \
648643
--build-number=${BUILD_NUMBER} \
649644
--release \

Diff for: mobile/.fvmrc

-3
This file was deleted.

Diff for: mobile/lib/common/poll_widget.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ class _PollWidgetState extends State<PollWidget> {
8282
},
8383
style: ButtonStyle(
8484
padding:
85-
MaterialStateProperty.all<EdgeInsets>(const EdgeInsets.all(15)),
86-
backgroundColor: MaterialStateProperty.all<Color>(Colors.white),
85+
WidgetStateProperty.all<EdgeInsets>(const EdgeInsets.all(15)),
86+
backgroundColor: WidgetStateProperty.all<Color>(Colors.white),
8787
),
8888
child: Row(
8989
mainAxisAlignment: MainAxisAlignment.start,

0 commit comments

Comments
 (0)