flutterflowforge 1.0.0
flutterflowforge: ^1.0.0 copied to clipboard
A tool for automating Flutter application builds and GitHub releases.
FlutterFlowForge Examples #
This directory contains examples showing how to use FlutterFlowForge both as a command-line tool and as a library.
CLI Examples #
Basic Usage #
# Build a Flutter app with split architecture APKs
flutterflowforge --build
# Build a Flutter app with universal APK
flutterflowforge --universal
# Release to GitHub
flutterflowforge --release --tag=v1.0.0
# Full build and release
flutterflowforge --build --universal --release --tag=v1.0.0
# Clean build with custom app name
flutterflowforge --build --clean-build --app-name="My Amazing App"
# Create a draft release with auto-generated release notes
flutterflowforge --release --tag=v1.0.0 --draft --generate-notes
# Specify release details
flutterflowforge --release \
--tag=v1.0.0 \
--name="Version 1.0.0" \
--body="This release includes bug fixes and performance improvements" \
--draft
# Build command
flutterflowforge build --clean --app-name="My Amazing App"
# Release command
flutterflowforge release --tag=v1.0.0 --draft
Library Usage #
Building Flutter Apps #
import 'package:flutterflowforge/flutterflowforge.dart';
Future<void> main() async {
// Initialize the builder
final builder = FlutterFlowForge();
// Build APKs with default options
await builder.buildApp();
// Build with custom options
await builder.buildApp(
cleanBuild: true,
buildUniversal: true,
appName: 'Custom App Name',
buildNumber: '2',
buildVersion: '1.0.1',
);
}
Creating GitHub Releases #
import 'package:flutterflowforge/flutterflowforge.dart';
Future<void> main() async {
// Initialize the builder
final forge = FlutterFlowForge();
// Create a GitHub release
await forge.createGitHubRelease(
tag: 'v1.0.0',
name: 'Version 1.0.0',
body: 'Release notes go here',
draft: true,
generateNotes: true,
);
// Build and release in one go
await forge.buildAndRelease(
tag: 'v1.0.0',
cleanBuild: true,
buildUniversal: true,
);
}
Configuration Setup #
Environment Variables #
Create a .env file in your project root with the following variables:
GITHUB_TOKEN=your_github_personal_access_token
REPO_OWNER=your_github_username_or_org
REPO_NAME=your_repository_name
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 in your
.envfile
Directory Structure #
For proper operation, your project should have:
your_project/
├── android/ # android folder
├── build/ # Build output directory
│ └── app/outputs/ # APK/App Bundle location
├── lib/
│ └── main.dart # Entrypoint for app
├── .env # Environment variables
├── pubspec.yaml # Flutter project file
└── ... other project files