Skip to main content

flutter_platform_sync 1.0.1 copy "flutter_platform_sync: ^1.0.1" to clipboard
flutter_platform_sync: ^1.0.1 copied to clipboard

CLI that syncs a Flutter project's Android Gradle/AGP/Kotlin versions to a target Flutter release, pins compileSdk/targetSdk to 36, and prompts for minSdk.

flutter_platform_sync #

A command-line tool that updates your Flutter project's Android build files to match a Flutter version you choose — so you don't have to hand-edit Gradle files yourself.

Android only for now. iOS/Xcode support is planned but not here yet.

What it does #

Every Flutter release ships with specific Gradle, AGP, Kotlin, and SDK version numbers. This tool reads those numbers straight from Flutter's own source code for the version you specify, then updates your project to match:

  • android/gradle/wrapper/gradle-wrapper.properties
  • android/settings.gradle.kts (or build.gradle)
  • android/app/build.gradle.kts (or .gradle)

If you're jumping to a Flutter version that needs Android Gradle Plugin (AGP) 9+, it also fixes the "Kotlin plugin no longer required" build error for you automatically.

Note: compileSdk and targetSdk are always set to 36, regardless of which Flutter version you pick — this is required for Google Play's 16 KB page size rule. minSdk is always your own choice; the tool will ask you for it.

Install #

You need Dart, which you already have if you have Flutter installed.

dart pub get

Usage #

1. Dry-run first — this shows you what would change without touching any files:

dart run bin/flutter_platform_sync.dart \
  --project /path/to/your/project \
  --version 3.35.5 \
  --dry-run

2. If the diff looks right, run it again without --dry-run:

dart run bin/flutter_platform_sync.dart \
  --project /path/to/your/project \
  --version 3.35.5

You'll be asked to confirm before anything is written, and asked what minSdk you want (just press Enter to leave it unchanged).

3. Build your project to make sure everything still works:

flutter clean
flutter build apk

Every file the tool changes gets a .bak backup saved next to it, so you can always undo:

mv android/app/build.gradle.kts.bak android/app/build.gradle.kts

Or, if your project is in git:

git checkout -- android/

Known limitations #

  • Only tested against one real project so far — always review the dry-run diff before applying, especially on older project layouts.
  • Doesn't bump Jetpack Compose's kotlinCompilerExtensionVersion — you may need to update that yourself after a Kotlin version change.

License #

MIT — see LICENSE.

0
likes
160
points
37
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

CLI that syncs a Flutter project's Android Gradle/AGP/Kotlin versions to a target Flutter release, pins compileSdk/targetSdk to 36, and prompts for minSdk.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

args, http

More

Packages that depend on flutter_platform_sync