Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/byteszero/flutter_distributor_docs
https://github.com/byteszero/flutter_distributor_docs
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/byteszero/flutter_distributor_docs
- Owner: BytesZero
- Created: 2022-01-17T08:18:23.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-22T05:27:10.000Z (almost 3 years ago)
- Last Synced: 2023-11-05T13:22:14.428Z (about 1 year ago)
- Size: 452 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
description: >-
Flutter Distributor is a complete tool for packaging and publishing your
Flutter applications.
---# Getting Started
## Installation
```
dart pub global activate flutter_distributor
```## Usage
Add `distribute_options.yaml` to your project root directory.
```yaml
output: dist/
```### Configure A Publisher
Let's take `pgyer` as an example, after logging in, click the user avatar on the right side to go to the [API information](https://www.pgyer.com/account/api) page from the menu, copy the `API Key` and add it to the env node.
![https://www.pgyer.com/account/api](.gitbook/assets/pgyer-api-info.png)
```yaml
env:
PGYER_API_KEY: 'your api key'
```Check out the [Publishers](configuration/publishers/) documentation for all possible publishers and how to configure them.
### Configure Release Items
The following example shows how to add a release that contains package `apk`, `ipa` and publish to `pgyer.com`, A `release` can include multiple jobs.
{% hint style="info" %}
The `build_args` are the args supported by the `flutter build` command, please modify it according to your project.
{% endhint %}```yaml
releases:
- name: dev
jobs:
# Build and publish your apk pkg to pgyer
- name: release-dev-android
package:
platform: android
target: apk
build_args:
flavor: dev
target-platform: android-arm,android-arm64
dart-define:
APP_ENV: dev
publish_to: pgyer
# Build and publish your ipa pkg to pgyer
- name: release-dev-ios
package:
platform: ios
target: ipa
build_args:
flavor: dev
export-options-plist: ios/dev_ExportOptions.plist
dart-define:
APP_ENV: dev
publish_to: pgyer
```### Full Example Configuration
```yaml
env:
PGYER_API_KEY: 'your api key'
output: dist/
releases:
- name: dev
jobs:
# Build and publish your apk pkg to pgyer
- name: release-dev-android
package:
platform: android
target: apk
build_args:
flavor: dev
target-platform: android-arm,android-arm64
dart-define:
APP_ENV: dev
publish_to: pgyer
# Build and publish your ipa pkg to pgyer
- name: release-dev-ios
package:
platform: ios
target: ipa
build_args:
flavor: dev
export-options-plist: ios/dev_ExportOptions.plist
dart-define:
APP_ENV: dev
publish_to: pgyer
```### Release Your App
```
flutter_distributor release --name dev
```## Thank You
🎉 🎉 🎉