Skip to content

Commit

Permalink
Merge pull request #276 from nimblehq/release/1.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
luongvo authored Oct 31, 2023
2 parents 271f3ea + cfff3e0 commit 1787454
Show file tree
Hide file tree
Showing 169 changed files with 357 additions and 72 deletions.
Binary file added .github/images/table-of-contents.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 11 additions & 6 deletions .github/workflows/android_deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build_and_deploy_android:
name: Build & Deploy Android
name: Android - Deploy Production build to Firebase
runs-on: ubuntu-latest
environment: production
timeout-minutes: 30
Expand All @@ -32,9 +32,6 @@ jobs:
dart pub global activate mason_cli
mason get
mason make template -c mason-config.json
# Move the generated project to the root directory for next steps & cleanup to not affect static code analysis
rsync -av --remove-source-files flutter_templates/ ./
rm -rf bricks sample
- name: Get Flutter dependencies
run: flutter pub get
Expand All @@ -48,14 +45,22 @@ jobs:
run: |
echo -e "$ENV" > .env
- name: Set up release signing configs
env:
ANDROID_RELEASE_KEYSTORE_BASE64: ${{ secrets.ANDROID_RELEASE_KEYSTORE_BASE64 }}
ANDROID_SIGNING_PROPERTIES: ${{ secrets.ANDROID_SIGNING_PROPERTIES }}
run: |
echo $ANDROID_RELEASE_KEYSTORE_BASE64 | base64 --decode > android/config/release.keystore
echo "$ANDROID_SIGNING_PROPERTIES" > android/signing.properties
# App Bundle requires Firebase connected to Play Store to upload https://appdistribution.page.link/KPoa
- name: Build Android apk
run: flutter build apk --flavor production --debug --build-number $GITHUB_RUN_NUMBER
run: flutter build apk --flavor production --release --build-number $GITHUB_RUN_NUMBER

- name: Deploy Android Production to Firebase
uses: wzieba/[email protected]
with:
appId: ${{ vars.FIREBASE_ANDROID_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }}
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
file: build/app/outputs/flutter-apk/app-production-debug.apk
file: build/app/outputs/flutter-apk/app-production-release.apk
5 changes: 1 addition & 4 deletions .github/workflows/android_deploy_production_to_playstore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build_and_deploy_android:
name: Build & Deploy Android
name: Android - Deploy Production build to Play Store
runs-on: ubuntu-latest
environment: production
timeout-minutes: 30
Expand All @@ -32,9 +32,6 @@ jobs:
dart pub global activate mason_cli
mason get
mason make template -c mason-config.json
# Move the generated project to the root directory for next steps & cleanup to not affect static code analysis
rsync -av --remove-source-files flutter_templates/ ./
rm -rf bricks sample
- name: Get Flutter dependencies
run: flutter pub get
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/android_deploy_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build_and_deploy_android:
name: Build & Deploy Android
name: Android - Deploy Staging build to Firebase
runs-on: ubuntu-latest
environment: staging
timeout-minutes: 30
Expand All @@ -32,9 +32,6 @@ jobs:
dart pub global activate mason_cli
mason get
mason make template -c mason-config.json
# Move the generated project to the root directory for next steps & cleanup to not affect static code analysis
rsync -av --remove-source-files flutter_templates/ ./
rm -rf bricks sample
- name: Get Flutter dependencies
run: flutter pub get
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/ios_deploy_staging_to_firebase.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: ios-deploy-to-staging
name: iOS - Deploy Staging build to Firebase
on:
# Trigger the workflow on push action
push:
branches:
- develop

jobs:
build_and_upload_staging_app_to_firebase:
name: Build And Upload iOS Staging Application To Firebase
build_and_deploy_ios:
name: iOS - Deploy Staging build to Firebase
runs-on: macOS-latest
environment: staging
env:
Expand Down Expand Up @@ -42,9 +42,6 @@ jobs:
dart pub global activate mason_cli
mason get
mason make template -c mason-config.json
# Move the generated project to the root directory for next steps & cleanup to not affect static code analysis
rsync -av --remove-source-files flutter_templates/ ./
rm -rf bricks sample
- name: Get Flutter dependencies
run: flutter pub get
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/ios_deploy_to_app_store.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: ios-deploy-production-to-app-store
name: iOS - Deploy Production build to AppStore
on:
# Trigger the workflow on push action
push:
branches:
- main

jobs:
build_and_upload_to_app_store:
name: Build And Upload iOS Application Production To AppStore
build_and_deploy_ios:
name: iOS - Deploy Production build to AppStore
runs-on: macOS-latest
environment: production
timeout-minutes: 30
Expand Down Expand Up @@ -43,9 +43,6 @@ jobs:
dart pub global activate mason_cli
mason get
mason make template -c mason-config.json
# Move the generated project to the root directory for next steps & cleanup to not affect static code analysis
rsync -av --remove-source-files flutter_templates/ ./
rm -rf bricks sample
- name: Get Flutter dependencies
run: flutter pub get
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/ios_deploy_to_testflight.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: ios-deploy-production-to-testflight
name: iOS - Deploy Production build to TestFlight
on:
# Trigger the workflow on push action
push:
branches:
- main

jobs:
build_and_upload_to_testflight:
name: Build And Upload iOS Application Production To TestFlight
build_and_deploy_ios:
name: iOS - Deploy Production build to TestFlight
runs-on: macOS-latest
environment: production
timeout-minutes: 30
Expand Down Expand Up @@ -43,9 +43,6 @@ jobs:
dart pub global activate mason_cli
mason get
mason make template -c mason-config.json
# Move the generated project to the root directory for next steps & cleanup to not affect static code analysis
rsync -av --remove-source-files flutter_templates/ ./
rm -rf bricks sample
- name: Get Flutter dependencies
run: flutter pub get
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ jobs:
dart pub global activate mason_cli
mason get
mason make template -c mason-config.json
# Move the generated project to the root directory for next steps & cleanup to not affect static code analysis
rsync -av --remove-source-files flutter_templates/ ./
rm -rf bricks sample
- name: Get Flutter dependencies
run: flutter pub get
Expand All @@ -53,6 +50,8 @@ jobs:
steps:
- name: Check out
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Set up Flutter environment
uses: subosito/flutter-action@v2
Expand Down Expand Up @@ -114,11 +113,11 @@ jobs:
field: project_name
value: sample

- name: Generate the new sample project
- name: Generate the new "sample" project
run: |
dart pub global activate mason_cli
mason get
mason make template -c mason-config.json
mason make template -c mason-config.json -o sample
- id: changes
name: Check for changes in the sample project
Expand Down
70 changes: 70 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Code of Conduct - Flutter Templates

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban
temporarily or permanently any contributor for other behaviors that they deem
inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at <>.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version
[1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and
[2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md),
and was generated by [contributing-gen](https://github.com/bttger/contributing-gen).
103 changes: 103 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Contributing to Flutter Templates

First off, thanks for taking the time to contribute! 🎉

Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable.

Please make sure to read the relevant section before making your contribution. It will make it much easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions.

Use the table of contents icon <img src="/.github/images/table-of-contents.png" width="25" height="25" /> on the top left corner of this document to get to a specific section of this guide quickly.

> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
> - Star the project
> - Tweet about it
> - Refer to this project in your project's readme
> - Mention the project at local meetups and tell your friends/colleagues
## Code of Conduct

This project and everyone participating in it is governed by the
[Flutter Templates Code of Conduct](https://github.com/nimblehq/flutter-templatesblob/master/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behavior
to <[email protected]>.

## What should I know before I get started?

### Get to know Mason

The Flutter templates use [Mason](https://github.com/felangel/mason) as the primary tool for generating a new Flutter project. Take some time to become familiar with it.

### Flutter templates structure

The repository contains three main files/directories:
- The `bricks` directory contains the primary development, which is the "template" brick.
- The `sample` directory contains a sample Flutter project that was automatically generated by the CI workflow. This ensures that the project is not broken during development.
- The `mason.yaml` file lists all the bricks in the repository.

## I Have a Question

Before you ask a question, it is best to search for existing [Issues](https://github.com/nimblehq/flutter-templates/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.

If you still feel the need to ask a question and need clarification, we recommend the following:

- Open a [Discussion](https://github.com/nimblehq/flutter-templates/discussions/new?category=q-a).
- Provide as much context as you can about what you're running into.
- Provide the project version and platform info (OS, Flutter version, etc), depending on what seems relevant.

We will then analyze and plan for it.

## I Want To Contribute

### Reporting Bugs

#### Before Submitting a Bug Report

A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information, and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.

- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side, e.g., using incompatible environment components/versions (Make sure that you have read the [README](https://github.com/nimblehq/flutter-templates/blob/main/README.md). If you are looking for support, you might want to check [this section](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/nimblehq/flutter-templates/issues?q=is%3Aissue+label%3A%22type+%3A+bug%22+).
- Also, make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
- Collect information about the bug:
- Stack trace (Traceback)
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
- Flutter's doctor (if the generated project runs failed)
- Possibly your input and the output
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?

#### How Do I Submit a Good Bug Report?

> You must never report security related issues, vulnerabilities, or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <[email protected]>.
We use GitHub issues to track bugs and errors. If you run into an issue with the project:

- Open a [Bug Report's Issue](https://github.com/nimblehq/flutter-templates/issues/new?assignees=&labels=type+%3A+bug&projects=&template=bug_template.md&title=Fix%3A+).
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports, you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.

### Your First Code Contribution

If you're not sure where to start contributing to Flutter Templates, browse through the [Issues](https://github.com/nimblehq/flutter-templates/issues) and choose one that suits you best.

### Pull Requests

Please follow these steps to have your contribution considered by the maintainers:

- Follow the [Flutter convention & style guides](https://nimblehq.co/compass/development/code-conventions/flutter/).
- After submitting your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing <details><summary>What if the status checks are failing?</summary>If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.</details>

While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.

## Style guides
### Git Branch Management

Check out our [Branch Management](https://nimblehq.co/compass/development/version-control/branch-management/) for more details about the branch formatting, naming, etc.

### Git Commit Messages

Check out our [Committing Code](https://nimblehq.co/compass/development/version-control/committing-code/) for more details about the commit message formatting, structure, etc.

### Code Conventions

Check out our [Flutter convention](https://nimblehq.co/compass/development/code-conventions/flutter/) for more details about the code convention and style guides.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Before using the template, ensure that you have installed the following prerequi

Follow these steps to set up a new project from the template:

1. Clone or download this repository to your local machine.
1. Use [Use this template](https://github.com/new?template_name=flutter-templates&template_owner=nimblehq) feature to create your new project repository or clone this template repository to your local machine.

2. Fetch all required bricks by running the command:

Expand All @@ -47,11 +47,16 @@ Follow these steps to set up a new project from the template:

`$ mason make template -c mason-config.json` to provide necessary inputs via a JSON file, e.g., [mason-config.json](mason-config.json) for the sample project.

Once the project is generated at `/{project_name}`, please refer to the [Getting Started](bricks/template/__brick__/%7B%7Bproject_name.snakeCase()%7D%7D#getting-started) documentation to make it ready for development.
Once the project is generated, please refer to the [Getting Started](bricks/template/__brick__/%7B%7Bproject_name.snakeCase()%7D%7D#getting-started) documentation to make it ready for development.

That's it! You have now set up a new Flutter project using the template 🎉

> **Note**
>
> The script generates all project files to the current working folder as default and cleans up all template stuff in the end. Run it with [Custom Output Directory](https://github.com/felangel/mason/tree/master/packages/mason_cli#custom-output-directory) to set a custom output folder and keep the template stuff to rerun.
>
> `$ mason make template -c mason-config.json -o my_flutter_project`
>
> You can find detailed information on `make` command options and usage in the [Mason documentation](https://github.com/felangel/mason/tree/master/packages/mason_cli#overview).
## Documentation
Expand Down
File renamed without changes.
Loading

0 comments on commit 1787454

Please sign in to comment.