Skip to content

Commit

Permalink
Merge pull request #241 from yumemi-inc/docs/issue-177-add-flutter-up…
Browse files Browse the repository at this point in the history
…grade-document

Flutter バージョン更新手順をドキュメント化
  • Loading branch information
K9i-0 committed Jun 11, 2024
2 parents db73cda + 334454e commit d48b723
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docs/en/UPGRADE_FLUTTER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!-- markdownlint-disable MD029 -->
### Procedure

Language: English | [日本語](/docs/ja/UPGRADE_FLUTTER.md)

1. Run `fvm use <upgrade version>`
2. Update `sdk` version in the root-level `pubspec.yaml`
3. Update the versions of `sdk` and `flutter` in the bootstrap section of `melos.yaml`

```yaml
command:
bootstrap:
environment:
sdk: ^x.x.x
flutter: ^x.x.x
```

> [!NOTE]
> The rule version of yumemi_lints needs to be updated in `analysis_options.yaml`, which is updated automatically by the post hooks in `melos bootstrap`.
>
>```yaml
>include: package:yumemi_lints/flutter/x.x.x/recommended.yaml
>```
>
>However, the version of yumemi_lints itself may be out of date and not compatible with the latest Flutter version, so please update yumemi_lints in that case.
4. Run `melos bootstrap`
5. Confirm that the application can be launched on iOS
6. Confirm that the application can be launched on Android
7. Follow the [Migration Guide](https://docs.flutter.dev/release/breaking-changes) and fix deprecated parts as needed.
### Points to note
- Confirm that the actual device works as well as iOS Simulator and Android Emulator.
- Check to see if packages, plug-ins, and libraries used on the Android and iOS side as well as the Flutter side need to be updated.
35 changes: 35 additions & 0 deletions docs/ja/UPGRADE_FLUTTER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!-- markdownlint-disable MD029 -->
### 手順

言語: 日本語 | [English](/docs/en/UPGRADE_FLUTTER.md)

1. `fvm use <upgrade version>` を実行
2. ルートの`pubspec.yaml``sdk`バージョンを更新
3. `melos.yaml`のbootstrapにある`sdk`, `flutter`部分のバージョンを更新

```yaml
command:
bootstrap:
environment:
sdk: ^x.x.x
flutter: ^x.x.x
```

> [!NOTE]
> `analysis_options.yaml`でyumemi_lintsのルールバージョンの更新が必要ですが、こちらは`melos bootstrap`のpost hooksで自動化的に更新されます。
>
>```yaml
>include: package:yumemi_lints/flutter/x.x.x/recommended.yaml
>```
>
>ただしyumemi_lints自体のバージョンが古くて最新Flutterバージョンに対応していない場合があるので、その場合はyumemi_lintsを更新してください。
4. `melos bootstrap`コマンドを実行
5. iOS でアプリが起動できることを確認
6. Android でアプリが起動できることを確認
7. [Migration Guide](https://docs.flutter.dev/release/breaking-changes) に従い、必要に応じて deprecate 箇所を修正
### 注意ポイント
- iOS Simulator や Android Emulator だけでなく、実機も動作することを確認
- Flutter 側だけでなく、 Android・iOS 側で利用しているパッケージ・プラグイン・ライブラリの更新が必要ないか確認

0 comments on commit d48b723

Please sign in to comment.