flutterflowforge 1.0.0
flutterflowforge: ^1.0.0 copied to clipboard
A tool for automating Flutter application builds and GitHub releases.
FlutterFlowForge #
A powerful tool for automating Flutter application builds and GitHub releases.
Features #
- Build Automation: Automate building Flutter applications (split architecture or universal APKs)
- APK Renaming: Automatically rename APKs with custom app names and version numbers
- GitHub Releases: Create GitHub releases and upload built artifacts
- Advanced Error Handling: Network connectivity checks, rate limit detection, and more
- Parallel Uploads: Efficiently upload multiple assets in parallel
- Security: Secure handling of GitHub tokens and sensitive information
Installation #
Global Installation #
# Install globally using dart pub
dart pub global activate flutterflowforge
After installation, you should be able to run:
flutterflowforge --help
If the command is not found, you may need to add the Dart pub cache bin directory to your PATH:
Windows:
%USERPROFILE%\AppData\Local\Pub\Cache\bin
macOS/Linux:
$HOME/.pub-cache/bin
Local Project Installation #
Add to your project's pubspec.yaml:
dependencies:
flutterflowforge: ^1.0.0
Then run:
dart pub get
Development Installation #
For development or testing purposes:
# Clone the repository
git clone https://github.com/iamthetwodigiter/flutterflowforge.git
cd flutterflowforge
# Activate the local copy
dart pub global activate --source path .
Troubleshooting Installation Issues #
If you're having trouble with the CLI installation, run:
flutterflowforge --troubleshoot
Or if that doesn't work:
dart pub global run flutterflowforge:flutterflowforge --troubleshoot
Usage #
Command Line #
# Build a Flutter app with split architecture APKs
flutterflowforge --build
# Build a Flutter app with universal APK
flutterflowforge --universal
# Release to GitHub
flutterflowforge --release
# Full build and release
flutterflowforge --build --universal --release
# Create a draft release with auto-generated notes
flutterflowforge --release --tag=v1.0.0 --draft --generate-notes
# Show help and available options
flutterflowforge --help
Advanced Release Options #
# Create a pre-release
flutterflowforge --release --tag=v1.0.0 --prerelease
# Specify a target branch or commit
flutterflowforge --release --tag=v1.0.0 --target-commitish=main
# Create a release with a linked discussion
flutterflowforge --release --tag=v1.0.0 --discussion-category=announcements
# Control if this is the "latest" release
flutterflowforge --release --tag=v1.0.0 --make-latest=legacy
As a Library #
import 'package:flutterflowforge/flutterflowforge.dart';
void main() async {
// Build app
final buildOptions = BuildOptions(
appName: 'MyAwesomeApp',
appVersion: 'v1.0.0',
cleanBuild: true,
buildSplitApk: true,
buildUniversalApk: true,
);
final builder = AppBuilder(buildOptions);
final success = await builder.build();
// Create GitHub release
if (success) {
final assetFiles = await builder.assetFilesList();
final releaseOptions = ReleaseOptions(
tagName: 'v1.0.0',
releaseName: 'Version 1.0.0',
releaseBody: 'New release with awesome features!',
isDraft: false,
isPrerelease: true,
generateReleaseNotes: true,
discussionCategoryName: 'announcements',
);
final releaser = GitHubReleaser(assetFiles, releaseOptions);
await releaser.release();
}
}
Environment Variables #
For GitHub releases, create a .env file with the following variables:
# Required for GitHub Releases
GITHUB_TOKEN=your_github_personal_access_token
REPO_OWNER=your_github_username_or_org
REPO_NAME=your_repository_name
# Release Configuration
TAG_NAME=v1.0.0
RELEASE_NAME=Version 1.0.0
RELEASE_BODY=Release description goes here
# Optional Parameters
TARGET_COMMITISH=main
DISCUSSION_CATEGORY_NAME=announcements
MAKE_LATEST=true|false|legacy
GitHub Authentication Setup #
FlutterFlowForge requires a GitHub Personal Access Token to create releases.
Getting a GitHub Personal Access Token #
- Go to your GitHub account settings
- Navigate to Developer settings > Personal access tokens > Tokens (classic)
- Click Generate new token > Generate new token (classic)
- Give your token a descriptive name
- Select the following scopes:
repo(Full control of private repositories)
- Click Generate token
- Copy the token and store it securely
Troubleshooting #
Rate Limiting #
GitHub API has rate limits. If you encounter rate limit errors, the tool will show when the limit resets.
Large Files #
GitHub has a 2GB file size limit for release assets. The tool will warn you about files that exceed this limit.
Network Issues #
The tool checks for network connectivity before attempting to make API requests.
Contributors #
Prabhat Jana
License #
This project is licensed under the MIT License - see the LICENSE file for details.