Automate your deployments on Heroku easily.
In dashboard:
You can copy the link of this repository and paste it in buildpacks or write diezep/flutter and will be added automatically.
In Heroku CLI:
$ heroku buildpacks:set diezep/flutter -a <Heroku App name>
You can add optional environment variables to customize the deployment of your project but nothing is required, all are optional.
By default, this buildpack get the last version of Flutter automatically, sometimes because is on beta channel, that version may have problems to compile a project with web support in cloud services.
If this is your case, you can try downgrade the Flutter version manually, add FLUTTER_VERSION variable in your Heroku environment with the number of the version that are currently working web support.
- VERSION to set the name of custom version of Flutter.
- CLEANUP to remove uneccessary files after the build.
- CACHE to remove and download every file its need to compile the project in every deploy.
- SUBDIR to ubicate the project if it isn't in a root directory.
- No more PHP Buildpack needed.
- Save and restore Flutter and Dart SDK in cache.
- Save and restore dhttpd in cache.
- Save and restore project dependencies needed in cache.
All variables were built following the structure FLUTTER_VARNAME to identified easily in Heroku configurations. If you want to use some variable, remember use the structure following to the variable.
Variable | Type | Default | Description |
---|---|---|---|
CLEANUP | boolean | true | Remove uneccessary files of your project after the compile. |
VERSION | string | Last version in beta channel. | The name of the version you want to use to compile the project. |
Example of setting CLEANUP var in Heroku CLI:
$ heroku config:set FLUTTER_CLEANUP=true -a project-name
The next image is an example of setting environment variables following the structure mentioned above :
This buildpack is unofficial that means i don't have any conection with Heroku or Google from Flutter developer team . This repository was made as a hobby, i'm always interested in learn new things, this is one demostration of that :)