share_my_apk 1.1.3-beta copy "share_my_apk: ^1.1.3-beta" to clipboard
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.

Pub Version License: MIT Status

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 apk commands
  • 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-interactive for 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

  1. Go to Firebase Console
  2. Select your project (or create a new one)
  3. Add an Android app if you don't have one (Web apps are NOT supported)
  4. Go to Project Settings โ†’ General
  5. Find your Android app and copy:
    • Project ID: your-firebase-project
    • App ID: 1:123456789:android:abcdef (NOT web app 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)
  1. Go to Firebase Console โ†’ Project Settings โ†’ Service Accounts
  2. Click "Generate new private key"
  3. Download the JSON file and save it securely
  4. Ensure the service account has Firebase App Distribution Admin role
  5. 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)
  1. Authenticate with Firebase CLI:
firebase login
  1. 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
  1. Set the environment variable:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
  1. 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 #

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? #


Made with โค๏ธ for the Flutter community

GitHub License

Because sharing should be simple, not a chore โœจ

2
likes
0
points
17
downloads

Publisher

verified publisherwebmobtech.com

Weekly Downloads

CLI tool for building and uploading Android APKs.

Repository (GitHub)
View/report issues

Topics

#apk-builder #android #upload #flutter #cli

License

unknown (license)

Dependencies

args, http, logging, path, process_run

More

Packages that depend on share_my_apk