Repository navigation
feat: support Flutter 3.50 and drop CocoaPods - #1115
Merged
Merged
Conversation
Flutter 3.50 refuses to build with Gradle < 9.3.1, AGP < 9.1.1 or KGP < 2.4.10. Move the example to the 3.50 template versions (Gradle 9.5.0, AGP 9.3.1, Java 17) and drop the Kotlin Gradle plugin: MainActivity is Java and the location plugin already compiles with Built-in Kotlin, so android.builtInKotlin and android.newDsl can both be true.
package:flutter/material.dart is deprecated in Flutter 3.50, which fails `flutter analyze --fatal-infos`. Applied with `dart fix --apply --code=migrate_design_widgets`. material_ui needs Flutter 3.47, so the example's floor moves there; the published packages don't use Material and are unaffected.
Every plugin the example uses is a Swift package, so remove its CocoaPods integration (Podfiles, Pods xcconfig includes and project references), as Flutter 3.50 recommends. Commit the migrations 3.50 applies on build: iOS 15.0 / macOS 12.0 deployment targets, SwiftPM integration for the macOS runner, and analyzer excludes for build and platform directories. Load the web example through flutter_bootstrap.js instead of the deprecated service worker snippet, so `--wasm` builds can pick Wasm.
ktlint-gradle is applied in every app's build, and only 13.1+ supports Gradle 9 (which Flutter 3.50 requires). Pin its ktlint engine to 1.0.1, the version 12.1.2 bundled, so the rules don't change. Align the buildscript AGP/KGP versions and the Java/JVM target (17) with Flutter 3.50's plugin template.
- iOS (CocoaPods): builds the example with SwiftPM disabled so the podspec keeps working now that the example is SwiftPM-only. - Web: builds with --wasm --no-deprecated-js-interop on every PR; the demo deploy uses the interop flag too. - Flutter 3.44: analyzes and tests the published packages and builds them into a fresh 3.44 app, so a floating `stable` can't hide a break in the declared minimum.
- iOS (CocoaPods): the example's Xcode project references the plugin as a Swift package, which can't resolve with SwiftPM off. Build a new CocoaPods app that depends on the plugin instead, and check that the pod was installed. - Flutter 3.44: `flutter pub get` in packages/location also resolves the example, which needs Flutter 3.47+. Remove the example from that job's checkout.
Remove the CocoaPods podspec. Swift Package Manager has been on by default since Flutter 3.44 (the plugin's minimum), Flutter 3.50 warns whenever it is off, and the CocoaPods trunk goes read-only in December 2026. Apps that turned SwiftPM off get Flutter's "only compatible with Swift Package Manager" error and need to turn it back on; other plugins can still use CocoaPods in the same app. Add-to-app hosts should use `flutter build swift-package`, since `flutter build ios-framework` and `macos-framework` only install plugins through CocoaPods. Remove the CocoaPods CI job, and replace the Podfile-based deployment-target section of the iOS/macOS install docs with SwiftPM instructions.
Lyokone
force-pushed
the
chore/flutter-3.50
branch
from
November 12, 2026 14:15
5cef9e0 to
ad7ec29
Compare
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.
CI uses
channel: stable, which is now Flutter 3.50, andmasterfails two jobs on it:Gradle version (8.14.3) is lower than Flutter's minimum supported version of 9.3.1. 3.50 also rejects AGP < 9.1.1 and KGP < 2.4.10.package:flutter/material.dartis deprecated, and the 8 infos in the example fail--fatal-infos.Changes
Example app (not published)
android.builtInKotlinandandroid.newDslare bothtrue.package:material_ui(dart fix --apply --code=migrate_design_widgets). The example now needs Flutter >= 3.47.web/index.htmlloadsflutter_bootstrap.jsinstead of the deprecated service worker snippet.locationplugin (android/build.gradle)minSdkstays 21: 3.50 still builds apps with minSdk 23.locationdrops CocoaPods (iOS/macOS)darwin/location.podspecis removed, so the plugin ships as a Swift package only. SwiftPM has been on by default since Flutter 3.44, the plugin's minimum, and 3.50 warns whenever it's off. Apps that turned it off get Flutter's "only compatible with Swift Package Manager" error and must turn it back on. Other plugins can still use CocoaPods in the same app.flutter build swift-package, becauseflutter build ios-framework/macos-frameworkonly install plugins through CocoaPods.CI
Web:flutter build web --wasm --no-deprecated-js-interopon every PR. The demo deploy adds--no-deprecated-js-interop.Flutter 3.44 (minimum supported): analyzes and tests the published packages, then builds them into a fresh 3.44 app. The example is removed from that checkout because it needs Flutter 3.47 or later.This also covers what #1108 set out to do.
Verification (local)
--fatal-infos, format and tests are clean. The Android, iOS simulator and macOS examples build.--wasm --no-deprecated-js-interopweb build runs in a browser: the permission and service checks round-trip throughlocation_web.ktlintCheckpasses.lintDebugshows the same 4 pre-existing errors; the extra warnings are newer dependency versions being available.builtInKotlin=false) that depends on the updated plugin builds an APK.