share_my_apk 1.1.3-beta
share_my_apk: ^1.1.3-beta copied to clipboard
CLI tool for building and uploading Android APKs.
๐ Share My APK #
The Ultimate Flutter APK Build & Upload Automation Tool
Stop the build-and-drag-drop dance! ๐ Your mouse deserves a break.
From code to shareable link in one command โก
Automate your Flutter Android APK builds and uploads with the power of magic (and some really good code)
๐ฏ Why Share My APK? #
๐ฉ Before Share My APK #
- Manual
flutter build apkcommands - Drag & drop APKs to upload sites
- Manually manage file names and versions
- Deal with upload failures and size limits
- Remember different tokens for different services
- Copy-paste download links manually
๐ After Share My APK #
- One command builds and uploads
- Automatic FVM detection and Flutter commands
- Comprehensive build pipeline (clean, pub get, gen-l10n)
- Fully automated - no manual confirmations needed
- Smart file naming with versions
- Robust error handling and retries
- Unified configuration management
- Instant shareable links
โจ What Makes It Special? #
| ๐ Feature | ๐ฏ Benefit | ๐ฅ Why It Matters |
|---|---|---|
| ๐ One-Command Magic | share_my_apk does it all |
Save hours of manual work |
| ๐ง Comprehensive Pipeline | Clean, deps, l10n, build | Enterprise-grade reliability |
| โ๏ธ Multi-Provider Support | Diawi + Gofile.io + Firebase | Enterprise-grade distribution |
| ๐ Smart Auto-Switching | Diawi โ Gofile for 70MB+ files | Zero upload failures |
| ๐ Smart Configuration | YAML-based setup | Set once, use forever |
| ๐ก๏ธ Reliable & Tested | Production-ready | Works every time |
| ๐จ Flexible Organization | Custom naming & folders | Keep your builds organized |
๐ What's New in v1.0.0? #
๐ Production Ready - First Stable Release!
โจ Key Improvements #
โ
Production Ready - Upgraded from beta to stable 1.0.0 release after comprehensive testing
โ
Zero Issues - Passed all quality checks with 100+ tests and complete validation
โ
Comprehensive Documentation - Complete API docs, examples, and guides
โ
Enterprise-Grade Quality - Rock-solid reliability for production workflows
โ
Full Pub.dev Compliance - Maximum scoring and best practices
๐ Click to see the new logs in action!
[32mโน๏ธ [12:55:55] ๐ Starting comprehensive APK build (mode: release)... [0m
[32mโน๏ธ [12:55:55] Using Flutter command: fvm flutter [0m
[32mโน๏ธ [12:55:55] ๐งน [1/4] Cleaning project... [0m
[32mโน๏ธ [12:55:58] ๐ฆ [2/4] Getting dependencies... [0m
[32mโน๏ธ [12:56:02] ๐ [3/4] Generating localizations... [0m
[32mโน๏ธ [12:56:04] ๐จ [4/4] Building APK (release mode)... [0m
[36mโจ [12:56:15] Build output: โ Built build/app/outputs/flutter-apk/app-release.apk (55.1MB) [0m
[32mโน๏ธ [12:56:15] โ
APK built successfully: ./build/app/outputs/flutter-apk/app-release.apk [0m
[32mโน๏ธ [12:56:15] Uploading APK... [0m
[32mโน๏ธ [12:56:15] File: ./moonnote_1.0.1+a2_2025_07_09_12_55_55.apk [0m
[32mโน๏ธ [12:56:15] Size: 55.10 MB [0m
[32mโน๏ธ [12:56:15] Provider: diawi [0m
[32mโน๏ธ [12:56:25] Upload successful: https://i.diawi.com/SzSiZc [0m
[32mโโโโโโโโโโโโโโโโโโโโโโโ [0m
[32mโ APK successfully uploaded to diawi! โ [0m
[32mโ Download link: https://i.diawi.com/SzSiZc โ [0m
[32mโโโโโโโโโโโโโโโโโโโโโโโ [0m
๐ฏ Interactive Mode (NEW!) #
โจ Never Remember Tokens Again!
Share My APK now features interactive provider selection - just run the command and choose your upload method!
$ share_my_apk
# ... APK builds ...
๐ค How would you like to distribute your APK?
โ 1. Diawi - Quick team sharing (70MB limit, 30-day expiry)
2. Gofile - Large files (no size limit, permanent links)
3. Firebase App Distribution - Enterprise distribution with tester management
4. Skip upload - Just build the APK
Select option (1-4) [1]: 3
# Interactive Firebase setup wizard appears!
๐ Firebase Project ID: my-project
๐ฑ Firebase App ID: 1:123:android:abc
...
๐ฏ Features:
- Smart Detection - Automatically skips prompts if already configured
- Full Firebase Wizard - Collects all Firebase settings interactively
- Save Configuration - Optional config save for future use
- Non-Interactive Mode - Use
--no-interactivefor CI/CD
Usage #
This section provides a quick overview of how to use share_my_apk. For more detailed examples, refer to the Usage Examples section.
โก Quick Start #
1๏ธโฃ Install #
dart pub global activate share_my_apk
2๏ธโฃ Configure #
share_my_apk init
3๏ธโฃ Build & Upload #
share_my_apk
4๏ธโฃ Share #
Get instant download link! ๐
Installation #
This section details how to install share_my_apk. For more options, refer to the Installation Options section.
๐ Global Installation #
dart pub global activate share_my_apk
Perfect for CLI usage across all projects
๐ฆ Project Dependency #
dev_dependencies:
share_my_apk: ^1.0.0
Perfect for team projects and CI/CD pipelines
Examples #
๐ง Basic Usage #
# Initialize configuration (one-time setup)
share_my_apk init
# Build and upload with default settings
share_my_apk
# Use specific provider
share_my_apk --provider gofile
share_my_apk --provider firebase
# Custom naming and environment
share_my_apk --name MyApp_Beta --environment staging
# Debug build
share_my_apk --no-release
# Skip build pipeline steps (for faster builds)
share_my_apk --no-clean --no-pub-get
โ๏ธ Advanced Configuration #
Create share_my_apk.yaml in your project root:
# Provider settings
provider: diawi
# API tokens
diawi_token: your_diawi_token_here
gofile_token: your_gofile_token_here
# Firebase App Distribution (for enterprise distribution)
firebase_project_id: your-firebase-project
firebase_app_id: 1:123456789:android:abcdef
firebase_service_account_path: /path/to/service-account.json
firebase_release_notes: "New beta release with bug fixes"
firebase_testers: tester1@example.com,tester2@example.com
firebase_groups: internal-team,beta-testers
# Build settings
release: true
path: .
# Build pipeline controls
clean: true # Run flutter clean
pub-get: true # Run flutter pub get
gen-l10n: true # Generate localizations
# File organization
name: MyApp_Production
environment: prod
output-dir: build/releases
๐ฌ Library Usage #
import 'package:share_my_apk/share_my_apk.dart';
void main() async {
// Build APK with comprehensive pipeline
final buildService = FlutterBuildService();
final apkPath = await buildService.build(
release: true,
customName: 'MyApp_Beta',
environment: 'staging',
clean: true, // Run flutter clean
getPubDeps: true, // Run flutter pub get
generateL10n: true, // Generate localizations
);
// Upload to cloud
final uploader = UploadServiceFactory.create('gofile');
final downloadLink = await uploader.upload(apkPath);
print('๐ Download link: $downloadLink');
}
๐ฏ Command Reference #
| Command | Alias | Description | Example |
|---|---|---|---|
--help |
-h |
Show help message | share_my_apk --help |
init |
- | Generate config file | share_my_apk init |
--path |
-p |
Project path | share_my_apk -p /my/project |
--provider |
- | Upload provider | share_my_apk --provider gofile |
--name |
-n |
Custom APK name | share_my_apk -n MyApp_Beta |
--environment |
-e |
Environment folder | share_my_apk -e staging |
--output-dir |
-o |
Output directory | share_my_apk -o build/apks |
--diawi-token |
- | Diawi API token | share_my_apk --diawi-token abc123 |
--gofile-token |
- | Gofile API token | share_my_apk --gofile-token xyz789 |
--firebase-project-id |
- | Firebase project ID | share_my_apk --firebase-project-id my-project |
--firebase-app-id |
- | Firebase app ID | share_my_apk --firebase-app-id 1:123:android:abc |
--firebase-service-account |
- | Service account JSON path | share_my_apk --firebase-service-account ./key.json |
--firebase-notes |
- | Release notes | share_my_apk --firebase-notes "Beta release" |
--firebase-testers |
- | Comma-separated tester emails | share_my_apk --firebase-testers "a@test.com,b@test.com" |
--firebase-groups |
- | Comma-separated groups | share_my_apk --firebase-groups "team,beta" |
--release |
- | Release build (default) | share_my_apk --release |
--no-release |
- | Debug build | share_my_apk --no-release |
--clean |
- | Run flutter clean (default) | share_my_apk --clean |
--no-clean |
- | Skip flutter clean | share_my_apk --no-clean |
--pub-get |
- | Run flutter pub get (default) | share_my_apk --pub-get |
--no-pub-get |
- | Skip flutter pub get | share_my_apk --no-pub-get |
--gen-l10n |
- | Generate localizations (default) | share_my_apk --gen-l10n |
--no-gen-l10n |
- | Skip localization generation | share_my_apk --no-gen-l10n |
--interactive |
-i |
Show interactive prompts (default) | share_my_apk --interactive |
--no-interactive |
- | Disable interactive prompts | share_my_apk --no-interactive |
--sound |
-s |
Play sound notification (default) | share_my_apk --sound |
--no-sound |
- | Disable sound notification | share_my_apk --no-sound |
๐ก Pro Tip: Share My APK automatically switches from Diawi to Gofile for files >70MB!
๐ฅ Firebase App Distribution Integration #
Enterprise-grade app distribution with professional tester management!
Firebase App Distribution is perfect for:
- ๐ข Enterprise teams with organized release management
- ๐ฅ Beta testing programs with specific user groups
- ๐ Secure distribution with access controls
- ๐ Release analytics and crash reporting integration
- ๐ CI/CD pipelines with automated distribution
๐ Quick Firebase Setup #
1๏ธโฃ Get Your Firebase Configuration
- Go to Firebase Console
- Select your project (or create a new one)
- Add an Android app if you don't have one (Web apps are NOT supported)
- Go to Project Settings โ General
- Find your Android app and copy:
- Project ID:
your-firebase-project - App ID:
1:123456789:android:abcdef(NOT web app ID!)
- Project ID:
โ ๏ธ Important: Firebase App Distribution only works with Android apps, not web apps. Make sure you're using an Android app ID in the format 1:123456789:android:abcdef.
2๏ธโฃ Install Firebase CLI (Required)
Firebase App Distribution requires the Firebase CLI to be installed:
# Install Node.js first (if not already installed)
# Download from: https://nodejs.org/
# Install Firebase CLI globally
npm install -g firebase-tools
# Verify installation
firebase --version
3๏ธโฃ Set Up Authentication (Choose one method)
๐ง Method 1: Service Account (Recommended for CI/CD)
- Go to Firebase Console โ Project Settings โ Service Accounts
- Click "Generate new private key"
- Download the JSON file and save it securely
- Ensure the service account has Firebase App Distribution Admin role
- Use the path in your configuration:
share_my_apk --provider firebase \
--firebase-project-id your-project \
--firebase-app-id 1:123456789:android:abcdef \
--firebase-service-account /path/to/service-account.json
๐ง Method 2: Firebase Login (Easy for local development)
- Authenticate with Firebase CLI:
firebase login
- Use Firebase without service account:
share_my_apk --provider firebase \
--firebase-project-id your-project \
--firebase-app-id 1:123456789:android:abcdef
๐ง Method 3: Environment Variable
- Set the environment variable:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
- Restart your terminal and use Firebase normally:
share_my_apk --provider firebase \
--firebase-project-id your-project \
--firebase-app-id 1:123456789:android:abcdef
4๏ธโฃ Upload Your First APK
# Basic Firebase upload
share_my_apk --provider firebase \
--firebase-project-id your-project \
--firebase-app-id 1:123456789:android:abcdef
# With tester distribution
share_my_apk --provider firebase \
--firebase-project-id your-project \
--firebase-app-id 1:123456789:android:abcdef \
--firebase-testers "tester1@company.com,tester2@company.com" \
--firebase-groups "internal-team,beta-users" \
--firebase-notes "New beta build with performance improvements"
๐ Firebase Configuration Examples #
Configuration File Setup (Recommended)
Create share_my_apk.yaml:
# Use Firebase as default provider
provider: firebase
# Firebase App Distribution configuration
firebase_project_id: your-firebase-project
firebase_app_id: 1:123456789:android:abcdef
firebase_service_account_path: /path/to/service-account.json
firebase_release_notes: "Weekly beta release - see changelog for details"
firebase_testers:
- dev-team@company.com
- qa-team@company.com
- beta-users@company.com
firebase_groups:
- internal-team
- beta-testers
- stakeholders
# Standard build settings
release: true
clean: true
name: MyApp_Firebase
environment: firebase-dist
Then simply run:
share_my_apk # Uses Firebase configuration
Environment Variables (Great for CI/CD)
# Set Firebase credentials
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
export FIREBASE_PROJECT_ID="your-firebase-project"
export FIREBASE_APP_ID="1:123456789:android:abcdef"
# Optional: Set testers and groups
export FIREBASE_TESTERS="team@company.com,beta@company.com"
export FIREBASE_GROUPS="internal,beta-users"
# Build and distribute
share_my_apk --provider firebase
Command Line (Quick one-offs)
# Full command with all options
share_my_apk \
--provider firebase \
--firebase-project-id your-project \
--firebase-app-id 1:123456789:android:abcdef \
--firebase-service-account ./firebase-key.json \
--firebase-notes "Hotfix release v1.2.1" \
--firebase-testers "urgent-testers@company.com" \
--firebase-groups "priority-users" \
--name HotfixBuild \
--environment urgent
๐ฏ Firebase Provider Benefits #
| ๐ Feature | ๐ Benefit | ๐ผ Perfect For |
|---|---|---|
| ๐ฅ Tester Management | Organized user groups | Enterprise teams |
| ๐ Release Analytics | Download/crash tracking | Product managers |
| ๐ Access Control | Secure distribution | Internal/confidential apps |
| ๐ Direct Integration | Works with Firebase suite | Apps using Firebase |
| ๐ฑ Firebase Console | Web-based management | Non-technical stakeholders |
| ๐ค CI/CD Ready | Service account auth | Automated deployments |
๐ ๏ธ Provider Comparison #
| Feature | Diawi | Gofile.io | Firebase |
|---|---|---|---|
| File Size Limit | 70MB | Unlimited | Unlimited |
| Link Expiration | 30 days | Permanent | Permanent |
| Access Control | Public link | Public link | ๐ฅ Managed testers |
| Analytics | Basic | None | ๐ Comprehensive |
| Tester Management | None | None | ๐ฏ Groups & individuals |
| Enterprise Features | Limited | None | ๐ข Full enterprise suite |
| Setup Complexity | Easy | Easy | Medium (worth it!) |
| Best For | Quick sharing | Large files | Professional distribution |
๐ Fully Automated Workflow #
Share My APK now provides a completely automated experience, perfect for CI/CD pipelines and production workflows.
๐งน [1/4] Cleaning project...
๐ฆ [2/4] Getting dependencies...
๐ [3/4] Generating localizations...
๐จ [4/4] Building APK (release mode)...
โน๏ธ [12:56:05] Uploading APK...
โน๏ธ [12:56:05] File: /path/to/your/app.apk
โน๏ธ [12:56:05] Size: 55.10 MB
โน๏ธ [12:56:05] Provider: diawi
๐ก๏ธ Reliability & Quality #
Share My APK is production-ready and thoroughly tested to ensure it works reliably in real-world scenarios.
โ What We've Tested #
- โ Large File Uploads - Successfully tested with 113MB+ APKs
- โ Network Resilience - Handles connection issues gracefully
- โ Provider Switching - Automatic fallback works seamlessly
- โ Build Pipeline - Comprehensive testing with FVM, clean builds, dependencies
- โ Edge Cases - Handles special characters, long paths, and more
- โ Cross-Platform - Works on Windows, macOS, and Linux
- โ CI/CD Ready - Fully automated for production deployments
Ready for your production workflow! ๐
๐ File Organization Magic #
Share My APK keeps your builds organized with smart naming:
output-directory/
โโโ environment/ # Optional environment folder
โ โโโ MyApp_1.0.0_2025_07_09_14_30_45.apk
โ โโโ MyApp_1.0.1_2025_07_09_15_15_30.apk
โ โโโ ...
โโโ staging/
โ โโโ MyApp_Beta_1.0.0_2025_07_09_12_00_00.apk
โ โโโ ...
โโโ prod/
โโโ MyApp_Production_1.0.0_2025_07_09_16_45_30.apk
โโโ ...
Naming Pattern: {name}_{version}_{timestamp}.apk
๐ Need More Info? #
| ๐ Resource | ๐ฏ What's Inside |
|---|---|
| API Documentation | Complete API reference and guides |
| Release Notes | What's new and version history |
| Changelog | Detailed version changes |
| Examples | Working code examples and use cases |
๐ Ready to Get Started? #
dart pub global activate share_my_apk
share_my_apk init
share_my_apk
That's it! You're now sharing APKs like a pro! ๐ฏ
๐ฌ Need Help? #
- ๐ Read the docs
- ๐ Report issues
- ๐ก Request features
- โญ Star on GitHub
Made with โค๏ธ for the Flutter community
Because sharing should be simple, not a chore โจ