dartdosh 0.1.6
dartdosh: ^0.1.6 copied to clipboard
A powerful Flutter build CLI tool with automatic version management, smart file naming, and personalized experience
example/README.md
DartDosh Example #
This example demonstrates how to use DartDosh CLI tool in your Flutter project.
Setup #
- Install DartDosh globally:
dart pub global activate dartdosh
- Create a
build_config.jsonin your Flutter project root (or let DartDosh create it automatically):
{
"output_path": "releases",
"apk": {
"production": "flutter build apk --release --flavor production",
"staging": "flutter build apk --release --flavor staging",
"development": "flutter build apk --debug --flavor development"
},
"ipa": {
"production": "flutter build ipa --release --flavor production",
"staging": "flutter build ipa --release --flavor staging"
},
"appbundle": {
"production": "flutter build appbundle --release --flavor production",
"staging": "flutter build appbundle --release --flavor staging"
}
}
Usage Examples #
Build Production APK #
dartdosh build apk --production
Output:
đ Boshlash: Build apk (production mode), Xo'jayiin!
â
Build number yangilandi: 45 â 46
đ§ apk build bosqichi: Flutter komandalar bajarilmoqda, Xo'jayiin...
đ Ishga tushirilmoqda: flutter build apk --release --flavor production, Xo'jayiin!
â
apk build muvaffaqiyatli yakunlandi, Xo'jayiin!
đ Output directory yaratildi: /path/to/releases
â
Build saqlandi: /path/to/releases/production_1.2.3_46.apk
đ Build yakunlandi: apk (production), Xo'jayiin!
Build Split APK #
dartdosh build apk --production --split
This automatically converts --split to --split-per-abi and creates separate APKs for each architecture:
production_1.2.3_46_arm64-v8a.apkproduction_1.2.3_46_armeabi-v7a.apkproduction_1.2.3_46_x86_64.apk
Build iOS IPA #
dartdosh build ipa --production
Build App Bundle #
dartdosh build appbundle --staging
Add Extra Flags #
dartdosh build apk --production --obfuscate --split-debug-info=/path/to/symbols
Features Demonstrated #
- Auto Version Increment: Build number in
pubspec.yamlis automatically incremented before each build - Smart File Naming: Output files are named as
{environment}_{version}_{buildNumber}.{ext} - Output Path Management: Built files are copied to the specified
output_path - Auto Config Generation: If
build_config.jsondoesn't exist, it's created automatically - Personalized Experience: All messages include "Xo'jayiin" (Boss) for a friendly touch
First Time Usage #
If you run DartDosh without build_config.json, it will create one for you:
dartdosh build apk --production
Output:
đ build_config.json topilmadi...
đ Default konfiguratsiya yaratilmoqda, Xo'jayiin!
â
build_config.json muvaffaqiyatli yaratildi!
đ Joylashuv: /path/to/project/build_config.json
âšī¸ Kerakli o'zgarishlarni build_config.json da amalga oshiring.
Then customize the generated build_config.json to match your project's flavor configuration.