Repository navigation
Flutter 3.44.8対応: iOS SPM化 / Android built-in Kotlin化 / パッケージ更新 - #67
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
layer_first/feature_firstの両テンプレートを Flutter 3.44.8 で動作するように更新しました。あわせて iOS を Swift Package Manager 化、Android を built-in Kotlin 化し、パッケージを最新版へ更新しています。Flutter / Dart
.fvmrc/.tool-versions/.metadata)^3.12.2iOS: Swift Package Manager 化
両プロジェクトとも CocoaPods を完全に撤去しました(
Podfile/Podfile.lock/Podsを削除、xcconfig と workspace から Pods 参照を除去)。全プラグインが Swift Package に対応済みであることを確認しています。feature_firstは Podfile に独自処理があったため、以下を移行しました。post_installでGCC_PREPROCESSOR_DEFINITIONSを設定していましたが、permission_handler_apple 9.5 のPackage.swiftが Info.plist のキーから自動判定するようになったため不要になりました。既存のNSCameraUsageDescription/NSPhotoLibrary*UsageDescriptionにより Camera・Photos・Notifications が有効化され、旧設定と一致します。${PODS_ROOT}/FirebaseCrashlytics/runは CocoaPods 撤去で解決できなくなるため、SPM 用パス${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/runに変更。abseil-cpp-binary/grpc-binaryなどプリビルドを利用するため代替されます。iOS: UIScene ライフサイクル移行
layer_firstは Flutter の自動移行が適用されました。feature_firstは AppDelegate にカスタム処理があり自動移行の対象外だったため、手動で移行しています。AppDelegateをFlutterImplicitEngineDelegateに準拠させ、登録処理をdidInitializeImplicitFlutterEngineへ移動didFinishLaunchingWithOptionsの時点でwindow.rootViewControllerが未設定になるため、ScreenReaderPluginへはengineBridge.applicationRegistrar.messenger()を渡すよう変更(configureの引数をFlutterViewController→FlutterBinaryMessengerに変更)Info.plistにUIApplicationSceneManifestを追加Android: Gradle / built-in Kotlin
flutter.compileSdkVersion(36)built-in Kotlin 化(両プロジェクト共通)
app/build.gradle.ktsからid("kotlin-android")を削除(Flutter Gradle Plugin が自動適用)android { kotlinOptions { } }→ トップレベルのkotlin { compilerOptions { jvmTarget = JVM_17 } }gradle.propertiesにandroid.newDsl=false/android.builtInKotlin=falseを追加、android.enableJetifier=trueを削除settings.gradle.ktsの KGP 宣言はapply falseのまま維持(Flutter Gradle Plugin が classpath から解決するため必要)ndkVersionのハードコードをやめflutter.ndkVersionに戻しましたfeature_first のみ
getDefaultProguardFile("proguard-android.txt")→proguard-android-optimize.txt、buildFeatures { resValues = true }を追加(AGP 9 からresValuesがデフォルト無効)静的解析
riverpod_lint3.1 系がcustom_lintから Dart ネイティブのanalysis_server_pluginに移行したため、設定方法を変更しました。custom_lintを依存から削除analysis_options.yamlのanalyzer: plugins:→ トップレベルのplugins: riverpod_lint:へfeature_firstはanalyzer.excludeにbuild/**を追加(SPM 有効時にbuild/ios/SourcePackagesへ依存パッケージのソースが展開され、解析対象に入って 2000 件超の誤検知が出るため)パッケージ更新に伴う破壊的変更の対応
MapTypeenum →MapAppオブジェクト、MapLauncher.showMarker()→MapLauncher.marker(...).show()、アイコンが SVG → PNG バイト列(SvgPicture.asset→Image.memory)initialize/show/zonedSchedule/periodicallyShow/cancelが全て名前付き引数に変更getLocalTimezone()の戻り値がTimezoneInfoになったため.identifierを使用SnackBar.persistが追加され、既定値がpersist ?? action != nullになりました。showSnackBarは常にactionを渡していたためpersistが暗黙的にtrueとなり、durationが無視されて自動で閉じなくなっていました。persist: falseを明示して従来の挙動に戻していますsimple_directive_paths/directives_ordering/unnecessary_async)検証
UIScene 移行後の iOS ビルドで、UIScene 警告および
rootViewControllerの deprecation 警告が解消していることを確認済みです。レビュー時の確認事項
com.example.app/method/screenReader)の確認をお願いします。flutter_svgが未使用になりました(map_launcher 6.0.0 でアイコンが PNG 化されたため)。import は削除済みですが、テンプレートとして残すかは判断が必要なため pubspec には残しています。AppMapTypeenum(show_map_launcher.dart)は以前から未使用のデッドコードです。今回の変更対象外のため触っていません。🤖 Generated with Claude Code