share_my_apk 0.3.2 copy "share_my_apk: ^0.3.2" to clipboard
share_my_apk: ^0.3.2 copied to clipboard

Build and upload Flutter Android APKs to Diawi and Gofile.io faster than you can say 'It's compiling!' A fun and powerful CLI tool.

Share My APK

Tired of the build-and-drag-drop dance? πŸ•ΊπŸ’ƒ Is your mouse complaining about all the extra mileage?
Give your mouse a break! Share My APK is your new best friend, built with love and a sprinkle of magic to automate building and uploading your Flutter Android APKs. Share your builds faster than you can say "Why wasn't this a feature in the first place?!"

Pub Version License Build Status

Note: This package is in its alpha stage. It's like a baby bird, learning to fly. It might wobble a bit, so use it with an adventurous spirit! πŸ§ͺ

✨ Features (The Fun Stuff) #

  • πŸš€ Build & Upload: Go from code to shareable link in one command. It's so fast, you'll have time for an extra coffee break.
  • ☁️ Multiple Providers: Supports Diawi and Gofile.io. Why did the developer break up with the cloud? It was a stormy relationship.
  • πŸ“ Smart Configuration: Use a share_my_apk.yaml file. Because who wants to type the same thing over and over? Not you, that's who.
  • 🎨 Customization Galore: Customize file names, directory structures, and build environments. Make it yours!
  • πŸ’» User-Friendly CLI: A CLI so friendly, it might just ask you about your day.
  • πŸ”§ Extensible Library: Want to build your own sharing empire? Use our core services in your Dart projects.

πŸ“¦ Installation #

Activate share_my_apk globally. It's like giving it a key to your terminal's heart.

dart pub global activate share_my_apk

Or, if you're the "keep your friends close" type, add it to your project's dev_dependencies:

dev_dependencies:
  share_my_apk: ^0.3.2 # Always check for the latest version!

Then, run dart pub get.

πŸš€ Usage #

1. Initialize (The Smart Move) #

Generate a share_my_apk.yaml config file. Your future self will thank you.

share_my_apk --init

This creates a share_my_apk.yaml file, your personal instruction manual for the tool.

2. Run from the Command Line #

Time to let the magic happen. Use share_my_apk --help if you need a reminder of its awesome powers.

share_my_apk [options]

Key Options:

Option Alias Description
--help -h Shows the help message. It's like a map to treasure.
--init Generates the magical share_my_apk.yaml config file.
--diawi-token Your Diawi API token. Keep it secret, keep it safe.
--gofile-token Your Gofile API token. Also a secret.
--path -p Path to your Flutter project. Defaults to wherever you are.
--release Build in release mode (use --no-release for debug).
--provider Upload provider: diawi or gofile. Choose your champion.
--name -n Custom name for the APK file. Be creative!
--environment -e Environment folder (e.g., dev, prod, staging).
--output-dir -o Where to save the APK. Your treasure chest.

Examples:

# Let's get started!
share_my_apk --init

# Unleash the power!
share_my_apk

# "I choose you, Gofile!"
share_my_apk --provider gofile

# For when you're feeling a bit buggy.
share_my_apk --no-release

3. Use as a Library #

Want to get your hands dirty? Integrate share_my_apk's services into your own code.

Example:

import 'package:share_my_apk/share_my_apk.dart';
import 'package:logging/logging.dart';

void main() async {
  // Let's see what's happening under the hood.
  Logger.root.level = Level.ALL;
  Logger.root.onRecord.listen((rec) {
    print('${rec.level.name}: ${rec.time}: ${rec.message}');
  });

  final logger = Logger('MyApp');

  try {
    // 1. Build the APK. Abracadabra!
    final apkPath = await FlutterBuildService().build(
      release: true,
      projectPath: '.',
      customApkName: 'MyApp_SuperCool_Beta',
      environment: 'staging',
      outputDir: 'build/my_apks',
    );
    logger.info('βœ… APK built! Find it at: $apkPath');

    // 2. Send it to the cloud!
    final uploader = UploadServiceFactory.create(
      'gofile', // or 'diawi'
      token: 'YOUR_DIAWI_TOKEN', // Only for Diawi, remember?
    );

    final downloadLink = await uploader.upload(apkPath);
    logger.info('πŸš€ Houston, we have a download link: $downloadLink');

  } catch (e) {
    logger.severe('πŸ”₯ Uh oh, something went wrong: $e');
  }
}

πŸ“ File Naming & Organization #

  • Custom Naming: --name gives you {customName}_{version}_{timestamp}.apk.
  • Default Naming: You get {appName}_{version}_{timestamp}.apk.
  • Environments: --environment helps you avoid mixing up your dev and prod builds. Phew!
  • Custom Output: --output-dir lets you be the boss of your file system.

πŸ§ͺ Testing #

This package is in alpha. It's mostly house-trained, but please test it before introducing it to your production environment.

🀝 Contributing #

Got a joke to add? Or maybe a feature? Contributions are welcome! File an issue or a pull request on our GitHub repo.

πŸ“œ License #

This project is licensed under the MIT License. See the LICENSE file for details. Don't worry, it's a friendly license.

2
likes
0
points
17
downloads

Publisher

verified publisherwebmobtech.com

Weekly Downloads

Build and upload Flutter Android APKs to Diawi and Gofile.io faster than you can say 'It's compiling!' A fun and powerful CLI tool.

Repository (GitHub)
View/report issues

Topics

#apk-builder #android #upload #diawi #gofile

License

unknown (license)

Dependencies

args, http, logging, path, process_run, yaml

More

Packages that depend on share_my_apk