build_slim 0.4.0 copy "build_slim: ^0.4.0" to clipboard
build_slim: ^0.4.0 copied to clipboard

A CLI tool and library to analyze and reduce the size of Flutter APK, AAB, and IPA build artifacts using best-practice optimizations.

example/README.md

build_slim example #

This folder demonstrates how to use build_slim in a Flutter project.

1. Add the package #

flutter pub add --dev build_slim

Or activate it globally:

dart pub global activate build_slim

2. Analyze your project #

dart run build_slim optimize --analyze-only

This prints a list of findings without modifying files or starting a build.

3. Build an optimized APK #

dart run build_slim optimize --target apk --tree-shake-icons --obfuscate

The tool will:

  1. Analyze your project.
  2. Patch Android Gradle settings safely (with .bak backups).
  3. Inject --tree-shake-icons, --obfuscate, and --split-debug-info.
  4. Run flutter build apk.
  5. Print a before/after summary.

4. Compare artifacts #

If you already have two builds, compare them with:

build_slim report \
  --before ./build/app/outputs/flutter-apk/app-before.apk \
  --after ./build/app/outputs/flutter-apk/app-after.apk \
  --format html \
  --output ./size_diff.html
0
likes
160
points
51
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A CLI tool and library to analyze and reduce the size of Flutter APK, AAB, and IPA build artifacts using best-practice optimizations.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

ansi_styles, args, collection, meta, path, yaml

More

Packages that depend on build_slim