Skip to content

Update toolchain versions and build quality config#477

Merged
DennisAlund merged 11 commits intomainfrom
chore/toolchain-and-quality-improvements
Mar 12, 2026
Merged

Update toolchain versions and build quality config#477
DennisAlund merged 11 commits intomainfrom
chore/toolchain-and-quality-improvements

Conversation

@DennisAlund
Copy link
Member

Summary

  • Bound iOS SPM Facebook SDK range to "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))
  • Update Android toolchain — Kotlin 2.3.10, AGP 8.9.2, Gradle 8.11.1, compileSdk 35
  • Update iOS toolchain — swift-tools-version 6.1, podspec swift_version 5.9, iOS deployment target 12→13 (iOS 12 is EOL)
  • Tighten Dart/Flutter SDK constraints — Dart >=3.3.0, Flutter >=3.19.0 (aligned with ecosystem conventions, covers March 2024+)
  • Add analysis_options.yaml with flutter_lints for static analysis
  • Add Android build configgradle.properties (parallel builds, caching, non-transitive R classes) and consumer-proguard-rules.pro (prevent R8 stripping Facebook SDK classes in host apps)
  • Fix iOS typohandleHandleGetAnonymousIdhandleGetAnonymousId (private method only, no API change)

Test plan

  • Verify Android builds with updated AGP/Kotlin/Gradle
  • Verify iOS builds with updated swift-tools-version and deployment target
  • Run flutter analyze to confirm lints pass
  • Test on a host app with R8 shrinking enabled to confirm consumer ProGuard rules work
  • Confirm no behavioral changes — all changes are toolchain, config, and naming only

🤖 Generated with Claude Code

DennisAlund and others added 8 commits March 12, 2026 09:45
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>
Copilot AI review requested due to automatic review settings March 12, 2026 01:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_lints with a shared analysis_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.

Comment on lines 7 to +9
environment:
sdk: '>=2.12.0 <4.0.0'
flutter: '>=2.0.0'
sdk: '>=3.3.0 <4.0.0'
flutter: '>=3.19.0'
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

Acknowledged — version bump and changelog will be handled separately at release time, not as part of this toolchain PR.

DennisAlund and others added 3 commits March 12, 2026 10:02
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>
@DennisAlund DennisAlund merged commit fb0716c into main Mar 12, 2026
1 check passed
@DennisAlund DennisAlund deleted the chore/toolchain-and-quality-improvements branch March 12, 2026 02:11
DennisAlund added a commit that referenced this pull request Mar 12, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants