Skip to content

ci: flutter 3.50.0 - #649

Open
lowrt wants to merge 6 commits into
mainfrom
ci/flutter@3.47.8
Open

lowrt wants to merge 6 commits into
mainfrom
ci/flutter@3.47.8

Conversation

@lowrt

@lowrt lowrt commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

這個 PR 做了什麼

將 Flutter 從 3.47.0 升級至 3.50.0,遷移至獨立的 Material/Cupertino 套件,並更新 Android 建置工具鏈。同時修正壓縮資產載入問題。

正式程式碼

  • Flutter 與 UI 套件遷移

    • 更新 mise 釘選版本至 Flutter 3.50.0。
    • 新增 material_ui、cupertino_ui,遷移正式程式碼的相關 import。
    • 調整本地化 delegates,保留粵語使用繁體中文的 fallback。
    • 加入 MaterialUiCompatibilityBridge 與舊版本地化 delegates,支援尚未遷移的第三方元件。
    • 路由明確使用新版 MaterialPage,避免混用舊版 Material 頁面,保留頁面轉場行為。
  • Android 建置工具鏈

    • Gradle 升級至 9.9.1。
    • Android Gradle Plugin 升級至 9.4.1。
    • Kotlin Gradle Plugin 升級至 2.4.20。
    • 啟用 AGP built-in Kotlin 與新版 Android DSL。
    • 更新 flutter_tts fork 至包含 AGP 9 遷移修正的 commit。
  • 壓縮資產載入

    • 將 6 個內建壓縮資產的副檔名由 .gz 改為 .Z,內容仍維持 gzip 格式。
    • 同步更新鄉鎮目錄、鄉鎮邊界、即時震度網格、地震波走時表與星空資料的載入路徑。
    • 更新資產宣告,修正部分地圖與地震資料無法載入的問題。

測試

  • 更新受 Material/Cupertino 遷移影響的測試與 import。
  • 新增各支援語系的 Material 選單測試,確認新版與舊版本地化字串皆可取得。
  • 更新路由測試,確認頁面使用新版 MaterialPage 並保留路由 page key。

相關 issue

沒有對應的 issue。

怎麼驗

  • 各語系選單及本地化相容性測試通過。
  • 尚未重新在模擬器驗證選單、頁面轉場及返回手勢。
  • 最新設定下的完整 Android 原生測試、裝置測試尚未確認。

檢查清單

  • tool/check/commits.sh origin/main..HEAD 通過
    —— commit 訊息就是更新日誌,格式見 commit.md
  • 一個 commit 一件事(這條 gate 驗不了,靠自己和 review)
  • mise exec -- flutter analyze 與 mise exec -- flutter test 通過
  • 新的使用者可見字串都走 AppLocalizations,沒有寫死
  • CI 全部通過(gh pr checks:每一項都是 pass 或 skipped)—— 沒過不能合併,
    見 pr.md
  • 有 UI 變更的話:用的是 AppSpacing / AppRadius / AppMotion,
    深色模式看過,文字對比度可接受

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.41379% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.68%. Comparing base (20a7d08) to head (e20aa87).

Files with missing lines Patch % Lines
lib/app/router/app_router.dart 97.08% 3 Missing ⚠️

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lowrt lowrt changed the title ci: flutter 3.47.8 ci: flutter 3.50.0 Nov 12, 2026
@lowrt
lowrt force-pushed the ci/flutter@3.47.8 branch from 1d6cac8 to 4c10437 Compare November 12, 2026 03:30
@lowrt
lowrt marked this pull request as ready for review November 12, 2026 03:52
@lowrt lowrt added this to the v26.5 milestone Nov 12, 2026
@lowrt
lowrt force-pushed the ci/flutter@3.47.8 branch 7 times, most recently from 027befd to 13b8e08 Compare November 17, 2026 09:51
@lowrt
lowrt force-pushed the ci/flutter@3.47.8 branch 3 times, most recently from bddc814 to 49edb9b Compare November 17, 2026 11:54

@whes1015 whes1015 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先不核准。

Material/Cupertino 遷移、路由的 MaterialPage 與 page key、壓縮資產改成 .Z 仍用 gzip 解,這幾段看過,CI(Android、iOS、build、Instrumented)是綠的。背景定位改用負數 Job ID、舊工作留著排完、取消時核對 service,邏輯也對。要改的是 commit:進 main 之後更新日誌改不了。

  1. 2eaec0c2 把 Gradle/AGP 升級和背景定位的 Job ID 修正放在同一則。android/app/src/main/kotlin/com/exptech/dpip/BackgroundLocationJobService.kt:36 把 888892 改成 -888892,是為了避開 WorkManager 的非負數 ID,使用者遇得到。現在只會留下「更新相依套件」,而且 Platform: all。請拆成 fix、Platform: android,zh-Hant/en-US 各一行講這件事。Gradle 那則維持 build,拿掉 Optimization 條目。

  2. a2bb298 的「更新 Flutter 版本,維持應用程式相容性」是實作細節,build 不必進更新日誌。拿掉那兩行 Optimization。

  3. 2b75a069 只改震度標記的註解,跟這次升級無關。rebase 時移出這支即可。

補充,不擋:BackgroundLocationJobService.onStopJob 在 generations 還沒有該 jobId 時不會增加世代。JobScheduler 通常先呼叫 onStartJob。若要補,跟 onStartJob 一樣 getOrPut 之後再 incrementAndGet。

Agent 代 whes1015 審核(Discord 靈靈 ⇛ 臺南新營 要求)

@lowrt
lowrt force-pushed the ci/flutter@3.47.8 branch from 49edb9b to dd939fa Compare November 17, 2026 16:06

@whes1015 whes1015 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先不核准。

ed3aecc 只改 report_detail_page.dart 的震度標記註解,沒有更新日誌條目,依這次的決定留著,不擋。程式樹跟上次看過的 49edb9b 相同。還要改的是進 main 之後改不了的更新日誌:條目看 Category 行,不看 type,改成 chore 不會讓它們消失。

  1. 4718af70 仍有「更新 Flutter 版本,維持應用程式相容性」。這是實作細節,請拿掉兩行 Optimization,也拿掉 Platform:。

  2. 27343d46 還是把 Gradle/AGP 升級和背景定位的 Job ID 修正放在同一則,摘要也是 and。Fix 條目和 Platform: android 有了,但「更新 Android 建置工具與相依套件」仍會進更新日誌。請拆開:Job ID 用 fix、Platform: android,只留兩行 Fix;Gradle 用 build,不要寫 Optimization。

Agent 代 whes1015 審核(Discord 靈靈 ⇛ 臺南新營 要求)

@lowrt
lowrt force-pushed the ci/flutter@3.47.8 branch from dd939fa to 44c675b Compare November 18, 2026 01:25

@whes1015 whes1015 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先不核准。

ed3aecc 仍只改震度標記註解,沒有更新日誌,依上次決定留著。壓縮資產改 .Z、路由的 MaterialPage 與 page key、本地化相容層看過,沒有新的程式問題。Android、iOS、build、Instrumented 還在跑。要改的仍是進 main 之後改不了的更新日誌;背景定位那則修正也不見了。

  1. 4718af70 仍有「更新 Flutter 版本,維持應用程式相容性」。這是實作細節,請拿掉兩行 Optimization,也拿掉 Platform:。

  2. d7f357cd 現在是 Gradle 9.9.1、AGP 9.4.1、Kotlin 2.4.20 和 flutter_tts 的釘選,卻還寫著 Platform: all 和「更新相依套件」。使用者看不懂這條。請改成 build,拿掉 Optimization 和 Platform:。sky_deck.dart、seismometer_page.dart 只換了 material import,跟這則建置升級無關,放回 Flutter 那則。

  3. 背景定位的 Job ID 修正不在這支了。BackgroundLocationJobService.kt 的 JOB_ID 仍是 888892,檔案沒有進 diff。上次要的是拆成獨立的 fix、Platform: android,各寫一行 Fix,不是整段拿掉。若這支不做這件事,請明講;要做就補回單獨一則。

Agent 代 whes1015 審核(Discord 靈靈 ⇛ 臺南新營 要求)

Agent 代 whes1015 審核(Discord 靈靈 ⇛ 臺南新營 要求)

Platform: all

Optimization(zh-Hant): 更新 Flutter 版本,維持應用程式相容性
Optimization(en-US): update Flutter to maintain app compatibility
@lowrt
lowrt force-pushed the ci/flutter@3.47.8 branch 2 times, most recently from c89cc1f to a4adb87 Compare November 18, 2026 02:13

@whes1015 whes1015 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先不核准。

07a505b1 的「更新 Flutter 版本,維持應用程式相容性」照你的決定留著。這則已經把 material import 遷到 material_ui(lib/app/app.dart),Platform: all 也對。背景定位的 Job ID 這支不寫進來,不要求。壓縮資產、路由的 MaterialPage、本地化相容層跟上次是同一棵樹,沒有新的程式問題。

要改的是 813ce504。條目可以留,但現在這句不能進更新日誌:

這則只改了五個檔:android/gradle.properties(newDsl、builtInKotlin)、Gradle 9.3.1→9.9.1、AGP 9.1.1→9.4.1、Kotlin 2.4.10→2.4.20、flutter_tts 釘到 8f6265f3(註解寫的是 Android AGP 9 修正)。沒有 iOS 或共用 Dart 的行為變更。

commit.md:只影響一個平台就不要寫 Platform: all,更新日誌會兩個平台都標圖示;條目要寫使用者感覺得到的結果,不是實作。現在是 Platform: all,加上「核心元件底層優化,提升整體運作的穩定性」。iOS 也會出現這句,而且 diff 對不上。

請改成 Platform: android,zh-Hant/en-US 各一行講這次實際的事,例如維持 Android 語音功能與新版建置工具相容。不要寫成整體穩定性。

Android、iOS 的 CI 還在跑。

Agent 代 whes1015 審核(Discord 靈靈 ⇛ 臺南新營 要求)

Platform: all

Optimization(zh-Hant): 核心元件底層優化,提升整體運作的穩定性。
Optimization(en-US): optimize core component internals to improve overall operational stability.
Platform: all

Fix(zh-Hant): 修正無法載入部分地圖與地震資料
Fix(en-US): fix loading map and earthquake data
@lowrt
lowrt force-pushed the ci/flutter@3.47.8 branch from a4adb87 to e20aa87 Compare November 18, 2026 03:13

@whes1015 whes1015 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先不核准。Commit 拆開了,這次沒有要改的程式或更新日誌。

9ac73e73 是 build(android),只動這三個檔:android/gradle.properties(newDsl、builtInKotlin)、Gradle 9.3.1→9.9.1、AGP 9.1.1→9.4.1、Kotlin 2.4.10→2.4.20。沒有更新日誌條目,建置工具不會進更新日誌。

e90731e 只釘 flutter_tts(pubspec.yaml、pubspec.lock,a9cd6eda→8f6265f3)。依這次的決定,這則措辭不擋。

07a505b1 的 Flutter 更新日誌、8bcb87b 的震度標記註解,維持之前的決定。e20aa87 壓縮資產那則跟上次是同一棵樹 2c74448,沒有新的程式變更。

Android、iOS、build 還在跑。這三項過了再核准。Instrumented、changes、code-review 已過。

Agent 代 whes1015 審核(Discord 靈靈 ⇛ 臺南新營 要求)

@whes1015 whes1015 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

核准。

Head e20aa87 跟上次看的是同一棵樹,沒有新的程式要改。CI 現在全過:iOS、Android、Instrumented、build、changes、code-review、codecov/patch、codecov/project。

9ac73e73 是 Android 建置工具(Gradle 9.9.1、AGP 9.4.1、Kotlin 2.4.20),build 沒有更新日誌。e90731e 只釘 flutter_tts,這次不擔。07a505b1 的 Flutter 更新日誌、8bcb87b 的震度標記註解維持原決定。e20aa87 修正壓縮資產載入。

Agent 代 whes1015 審核(Discord 靈靈 ⇛ 臺南新營 要求)

@YinCheng0106 YinCheng0106 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants