Update toolchain versions and build quality config#477
Conversation
The SPM dependency used `from: "18.0.0"` which is unbounded and would accept v19, v20, etc. This could silently break the plugin on a major SDK update. Align with the podspec (`~> 18.0`) and Android (`[18.0,19.0)`) by using an explicit half-open range. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Kotlin 1.9.24 → 2.3.10 - AGP 8.5.2 → 8.9.2 - Gradle 8.7 → 8.11.1 - compileSdk 34 → 35 (Android 15) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- swift-tools-version 5.9 → 6.1 - Podspec swift_version 5.0 → 5.9 (align with Package.swift minimum) - iOS deployment target 12.0 → 13.0 (iOS 12 is EOL) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Dart >=2.12.0 → >=3.6.0 (Dart 3.6 ships with Flutter 3.27) - Flutter >=2.0.0 → >=3.27.0 The previous range was extremely broad and included versions from 2021. This still supports Flutter releases from December 2024 onward. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The project had no static analysis configuration. Add flutter_lints as a dev dependency with the standard recommended ruleset to catch common issues during development. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- gradle.properties: enable parallel builds, caching, and non-transitive R classes for faster incremental compilation - consumer-proguard-rules.pro: prevent R8 from stripping Facebook SDK classes in host apps that enable code shrinking Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename handleHandleGetAnonymousId → handleGetAnonymousId. This is a private method name only; the method channel string is unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dart >=3.6.0 → >=3.3.0, Flutter >=3.27.0 → >=3.19.0. Aligns with flutter_facebook_auth and covers releases from March 2024 onward without forcing aggressive upgrades on consumers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the plugin’s Android/iOS/Dart toolchains and build-quality configuration to better align with current ecosystem expectations and reduce accidental breaking dependency upgrades (notably the Facebook SDK major range).
Changes:
- Tighten Dart/Flutter SDK constraints and add
flutter_lintswith a sharedanalysis_options.yaml. - Update Android build toolchain (Gradle/AGP/Kotlin, compileSdk) and add consumer ProGuard + Gradle performance flags.
- Update iOS toolchain/deployment targets and bound the Facebook iOS SDK SPM dependency to
<19.0.0, plus a small private-method typo fix.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pubspec.yaml | Tightens SDK constraints and adds flutter_lints. |
| analysis_options.yaml | Enables flutter_lints ruleset repository-wide. |
| android/build.gradle | Updates Kotlin/AGP/compileSdk and wires in consumer ProGuard. |
| android/gradle/wrapper/gradle-wrapper.properties | Updates the plugin’s Gradle wrapper version. |
| android/gradle.properties | Adds Gradle performance/config flags. |
| android/consumer-proguard-rules.pro | Adds keep rules intended to prevent R8 stripping. |
| ios/facebook_app_events/Package.swift | Updates swift-tools-version, iOS platform, and SPM dependency range. |
| ios/facebook_app_events.podspec | Updates Swift version and iOS deployment target for CocoaPods consumers. |
| ios/facebook_app_events/Sources/facebook_app_events/FacebookAppEventsPlugin.swift | Fixes a private method name typo for getAnonymousId handling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| environment: | ||
| sdk: '>=2.12.0 <4.0.0' | ||
| flutter: '>=2.0.0' | ||
| sdk: '>=3.3.0 <4.0.0' | ||
| flutter: '>=3.19.0' |
There was a problem hiding this comment.
The SDK/Flutter constraints were tightened (Dart >=3.3.0, Flutter >=3.19.0), which is a breaking change for consumers. The package version is still 0.25.0; please bump the pubspec version (and update the changelog/release notes accordingly) so the published package reflects the new minimum toolchain requirements.
There was a problem hiding this comment.
Acknowledged — version bump and changelog will be handled separately at release time, not as part of this toolchain PR.
The keep rule only covers com.facebook.appevents.** — other Facebook SDK classes (FacebookSdk, GraphRequest, etc.) are directly referenced and won't be stripped by R8. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
No SwiftPM 6.1 features are used in the manifest. Keeping 5.9 avoids forcing SPM users onto a newer Xcode than necessary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align the example app's AGP (8.9.2), Kotlin (2.3.10), and Gradle (8.11.1) with the plugin so CI builds use the same toolchain. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bump version and update changelog for toolchain and build quality improvements from PR #477. Breaking changes: iOS minimum deployment target raised to 13, and Dart/Flutter SDK constraints tightened to Dart >=3.3.0 / Flutter >=3.19.0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
"18.0.0"..<"19.0.0"— was unbounded (from: "18.0.0") and could silently accept breaking major versions. Now consistent with podspec (~> 18.0) and Android ([18.0,19.0))flutter_lintsfor static analysisgradle.properties(parallel builds, caching, non-transitive R classes) andconsumer-proguard-rules.pro(prevent R8 stripping Facebook SDK classes in host apps)handleHandleGetAnonymousId→handleGetAnonymousId(private method only, no API change)Test plan
flutter analyzeto confirm lints pass🤖 Generated with Claude Code