btool 0.1.4 btool: ^0.1.4 copied to clipboard
Generic build helper tools for Flutter/Dart such as manipulating version, package name or application ID
A build helper for Dart/Flutter projects.
Contains utility for getting/setting various configs such as package version/name, min/target sdk version, etc. through a command-line or Dart import which you can utilize for your build steps.
Table of Contents
Getting started #
You can install globally, or locally as a dependency.
To see usage help, see below or use
dart run btool -h.
See API Reference
Command line #
Usage: btool <command> [...args]
||Get config value|
||Set config value|
-h, --help Show help -v, --version Show version -d, --working-dir Change working directory of script -V, --verbose Display debug output
Here is an example for a simple script that pushes the apk to the device Download folder.
#!/usr/bin/env sh name=$(dart run btool get packageName) version=$(dart run btool get packageVersion) source="$(pwd)/build/app/outputs/flutter-apk/app-release.apk" target="/sdcard/Download/$name-$version.apk" echo "adb push $source $target" adb push $source $target
I am developing this package on my free time, so any support, whether code, issues, or just stars is very helpful to sustaining its life. If you are feeling incredibly generous and would like to donate just a small amount to help sustain this project, I would be very very thankful!
I welcome any issues or pull requests on GitHub. If you find a bug, or would like a new feature, don't hesitate to open an appropriate issue and I will do my best to reply promptly.
If you are a developer and want to contribute code, here are some starting tips:
- Fork this repository
dart pub get
- Make any changes you would like
- Create tests for your changes
- Update the relevant documentation (readme, code comments)
- Create a PR on upstream