From cd03b2d8e3fd4222106e512cf9e3439897d3ee92 Mon Sep 17 00:00:00 2001 From: Alejandro Santiago Date: Mon, 19 Feb 2024 13:21:04 +0000 Subject: [PATCH] chore: migrate very_good_flutter_package (#5) --- .../workflows/very_good_flutter_package.yaml | 67 +++++++++++++++++++ mason.yaml | 4 +- very_good_flutter_package/.gitignore | 17 +++++ very_good_flutter_package/CHANGELOG.md | 66 ++++++++++++++++++ very_good_flutter_package/LICENSE | 21 ++++++ very_good_flutter_package/README.md | 67 +++++++++++++++++++ .../.github/ISSUE_TEMPLATE/bug_report.md | 29 ++++++++ .../.github/ISSUE_TEMPLATE/build.md | 14 ++++ .../.github/ISSUE_TEMPLATE/chore.md | 14 ++++ .../.github/ISSUE_TEMPLATE/ci.md | 14 ++++ .../.github/ISSUE_TEMPLATE/config.yml | 1 + .../.github/ISSUE_TEMPLATE/documentation.md | 14 ++++ .../.github/ISSUE_TEMPLATE/feature_request.md | 18 +++++ .../.github/ISSUE_TEMPLATE/performance.md | 14 ++++ .../.github/ISSUE_TEMPLATE/refactor.md | 14 ++++ .../.github/ISSUE_TEMPLATE/revert.md | 16 +++++ .../.github/ISSUE_TEMPLATE/style.md | 14 ++++ .../.github/ISSUE_TEMPLATE/test.md | 14 ++++ .../.github/PULL_REQUEST_TEMPLATE.md | 27 ++++++++ .../.github/cspell.json | 21 ++++++ .../.github/dependabot.yaml | 11 +++ .../.github/workflows/main.yaml | 25 +++++++ .../{{project_name.snakeCase()}}/.gitignore | 44 ++++++++++++ .../{{project_name.snakeCase()}}/README.md | 67 +++++++++++++++++++ .../analysis_options.yaml | 1 + .../coverage_badge.svg | 20 ++++++ .../lib/src/{{project_name.snakeCase()}}.dart | 7 ++ .../lib/{{project_name.snakeCase()}}.dart | 4 ++ .../{{project_name.snakeCase()}}/pubspec.yaml | 18 +++++ .../{{project_name.snakeCase()}}_test.dart | 12 ++++ .../publishable}} | 3 + .../analysis_options.yaml | 3 + very_good_flutter_package/brick.yaml | 24 +++++++ very_good_flutter_package/config.json | 5 ++ 34 files changed, 709 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/very_good_flutter_package.yaml create mode 100644 very_good_flutter_package/.gitignore create mode 100644 very_good_flutter_package/CHANGELOG.md create mode 100644 very_good_flutter_package/LICENSE create mode 100644 very_good_flutter_package/README.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/build.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/chore.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/ci.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/config.yml create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/documentation.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/feature_request.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/performance.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/refactor.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/revert.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/style.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/test.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/cspell.json create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/dependabot.yaml create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/workflows/main.yaml create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.gitignore create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/README.md create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/analysis_options.yaml create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/coverage_badge.svg create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/lib/src/{{project_name.snakeCase()}}.dart create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/lib/{{project_name.snakeCase()}}.dart create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/pubspec.yaml create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/test/src/{{project_name.snakeCase()}}_test.dart create mode 100644 very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/{{#publishable}}CHANGELOG.md{{/publishable}} create mode 100644 very_good_flutter_package/analysis_options.yaml create mode 100644 very_good_flutter_package/brick.yaml create mode 100644 very_good_flutter_package/config.json diff --git a/.github/workflows/very_good_flutter_package.yaml b/.github/workflows/very_good_flutter_package.yaml new file mode 100644 index 0000000..795a7a8 --- /dev/null +++ b/.github/workflows/very_good_flutter_package.yaml @@ -0,0 +1,67 @@ +name: very_good_flutter_package + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + paths: + - .github/workflows/very_good_flutter_package.yaml + - "very_good_flutter_package/**" + branches: + - main + pull_request: + paths: + - .github/workflows/very_good_flutter_package.yaml + - "very_good_flutter_package/**" + branches: + - main + +jobs: + brick: + runs-on: ubuntu-latest + + strategy: + matrix: + flutter-version: + # The version of Flutter to use should use the minimum Dart SDK version supported by the package, + # refer to https://docs.flutter.dev/development/tools/sdk/releases. + - "3.13.0" + - "any" + + steps: + - name: ๐Ÿ“š Git Checkout + uses: actions/checkout@v4 + + - name: ๐Ÿฆ Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ matrix.flutter-version }} + + - name: ๐Ÿงฑ Mason Make + run: | + dart pub global activate mason_cli + mason get + mason make very_good_flutter_package -c very_good_flutter_package/config.json -o output --on-conflict overwrite + + - name: ๐Ÿ“ฆ Install Dependencies + run: | + dart pub global activate very_good_cli + very_good packages get --recursive output/test_package + + - name: โœจ Check Formatting + run: dart format --set-exit-if-changed output/test_package + + - name: ๐Ÿ•ต๏ธ Analyze + run: dart analyze --fatal-infos --fatal-warnings output/test_package + + - name: ๐Ÿงช Run Tests + run: | + cd output/test_package + very_good test -j 4 --recursive --optimization --coverage --test-randomize-ordering-seed random + + - name: ๐Ÿ“Š Check Code Coverage + uses: VeryGoodOpenSource/very_good_coverage@v2 + with: + path: output/test_package/coverage/lcov.info diff --git a/mason.yaml b/mason.yaml index 39e419c..a6b9caf 100644 --- a/mason.yaml +++ b/mason.yaml @@ -6,4 +6,6 @@ bricks: very_good_dart_cli: path: very_good_dart_cli very_good_dart_package: - path: very_good_dart_package \ No newline at end of file + path: very_good_dart_package + very_good_flutter_package: + path: very_good_flutter_package \ No newline at end of file diff --git a/very_good_flutter_package/.gitignore b/very_good_flutter_package/.gitignore new file mode 100644 index 0000000..8fda8a1 --- /dev/null +++ b/very_good_flutter_package/.gitignore @@ -0,0 +1,17 @@ +.DS_Store +.atom/ +.idea/* +.vscode/* + +# Files and directories created by pub +.dart_tool/ +.packages +pubspec.lock + +# Files and directories created by mason +.mason/ +mason-lock.json +output/ + +# Files and directories created by MacOS +.DS_Store \ No newline at end of file diff --git a/very_good_flutter_package/CHANGELOG.md b/very_good_flutter_package/CHANGELOG.md new file mode 100644 index 0000000..860fd88 --- /dev/null +++ b/very_good_flutter_package/CHANGELOG.md @@ -0,0 +1,66 @@ +# 0.4.1 + +- feat: upgrade to very_good_analysis ^5.1.0 +- docs: update README.md install instructions + +# 0.4.0 + +- feat!: bump min Dart SDK to 3.0.0 + +# 0.3.0 + +- feat!: bump min Dart SDK to 2.19.0 + +# 0.2.6 + +- chore: support dart sdk 2.18.0 + +# 0.2.5 + +- feat: update workflows, add spellcheck +- fix: flutter version on github workflow + +# 0.2.4 + +- fix: upgrade workflow to use Flutter 3.7.3 for compatibility with Very Good Analysis + +# 0.2.3 + +- feat: upgrade to `very_good_analysis ^4.0.0` + +# 0.2.2 + +- feat: upgrade to Flutter 3.7.0 + +# 0.2.1 + +- fix: windows path resolution +- fix: GitHub workflow concurrency group + +# 0.2.0 + +- **BREAKING** feat: add `publishable` flag (defaults to `false`) + +# 0.1.4 + +- docs: remove copyright header and license from generated code + +# 0.1.3 + +- feat: upgrade to Flutter 3.3.7 + +# 0.1.2 + +- feat: upgrade to Flutter 3.3.3 + +# 0.1.1 + +- feat: upgrade to Flutter 3.3.2 and very_good_analysis 3.1.0 + +# 0.1.0 + +- feat: upgrade to Flutter 3.3.1 and very_good_analysis 3.0.2 + +# 0.0.1 + +- feat: initial release ๐ŸŽ‰ diff --git a/very_good_flutter_package/LICENSE b/very_good_flutter_package/LICENSE new file mode 100644 index 0000000..7918ffb --- /dev/null +++ b/very_good_flutter_package/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Very Good Ventures + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/very_good_flutter_package/README.md b/very_good_flutter_package/README.md new file mode 100644 index 0000000..10c292a --- /dev/null +++ b/very_good_flutter_package/README.md @@ -0,0 +1,67 @@ +# Very Good Flutter Package + +[![Very Good Ventures][logo_white]][very_good_ventures_link_dark] + +Developed with ๐Ÿ’™ by [Very Good Ventures][very_good_ventures_link] ๐Ÿฆ„ + +[![License: MIT][license_badge]][license_link] +[![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason) + +A Very Good Flutter package created by Very Good Ventures ๐Ÿฆ„. + +## What's Included โœจ + +- โœ… GitHub Workflow powered by [Very Good Workflows][very_good_workflows_link] +- โœ… Pull Request Template +- โœ… Issue Templates +- โœ… Dependabot Integration +- โœ… Strict lint rules powered by [Very Good Analysis][very_good_analysis_link] +- โœ… 100% Test Coverage +- โœ… Fully Documented Public API +- โœ… MIT License +- โœ… Changelog + +## Output ๐Ÿ“ฆ + +```sh +โ”œโ”€โ”€ .github +โ”‚ โ”œโ”€โ”€ ISSUE_TEMPLATE +โ”‚ โ”‚ โ”œโ”€โ”€ bug_report.md +โ”‚ โ”‚ โ”œโ”€โ”€ build.md +โ”‚ โ”‚ โ”œโ”€โ”€ chore.md +โ”‚ โ”‚ โ”œโ”€โ”€ ci.md +โ”‚ โ”‚ โ”œโ”€โ”€ config.yml +โ”‚ โ”‚ โ”œโ”€โ”€ documentation.md +โ”‚ โ”‚ โ”œโ”€โ”€ feature_request.md +โ”‚ โ”‚ โ”œโ”€โ”€ performance.md +โ”‚ โ”‚ โ”œโ”€โ”€ refactor.md +โ”‚ โ”‚ โ”œโ”€โ”€ revert.md +โ”‚ โ”‚ โ”œโ”€โ”€ style.md +โ”‚ โ”‚ โ””โ”€โ”€ test.md +โ”‚ โ”œโ”€โ”€ PULL_REQUEST_TEMPLATE.md +โ”‚ โ”œโ”€โ”€ dependabot.yaml +โ”‚ โ””โ”€โ”€ workflows +โ”‚ โ””โ”€โ”€ main.yaml +โ”œโ”€โ”€ .gitignore +โ”œโ”€โ”€ CHANGELOG.md +โ”œโ”€โ”€ LICENSE +โ”œโ”€โ”€ README.md +โ”œโ”€โ”€ analysis_options.yaml +โ”œโ”€โ”€ coverage_badge.svg +โ”œโ”€โ”€ lib +โ”‚ โ”œโ”€โ”€ src +โ”‚ โ”‚ โ””โ”€โ”€ my_package.dart +โ”‚ โ””โ”€โ”€ my_package.dart +โ”œโ”€โ”€ pubspec.yaml +โ””โ”€โ”€ test + โ””โ”€โ”€ src + โ””โ”€โ”€ my_package_test.dart +``` + +[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg +[license_link]: https://opensource.org/licenses/MIT +[logo_white]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_white.png#gh-dark-mode-only +[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis +[very_good_ventures_link_dark]: https://verygood.ventures#gh-dark-mode-only +[very_good_ventures_link]: https://verygood.ventures +[very_good_workflows_link]: https://github.com/VeryGoodOpenSource/very_good_workflows diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/bug_report.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..50a4c7b --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: Bug Report +about: Create a report to help us improve +title: "fix: " +labels: bug +--- + +**Description** + +A clear and concise description of what the bug is. + +**Steps To Reproduce** + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected Behavior** + +A clear and concise description of what you expected to happen. + +**Screenshots** + +If applicable, add screenshots to help explain your problem. + +**Additional Context** + +Add any other context about the problem here. diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/build.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/build.md new file mode 100644 index 0000000..0cf8e62 --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/build.md @@ -0,0 +1,14 @@ +--- +name: Build System +about: Changes that affect the build system or external dependencies +title: "build: " +labels: build +--- + +**Description** + +Describe what changes need to be done to the build system and why. + +**Requirements** + +- [ ] The build system is passing diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/chore.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/chore.md new file mode 100644 index 0000000..498ebfd --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/chore.md @@ -0,0 +1,14 @@ +--- +name: Chore +about: Other changes that don't modify src or test files +title: "chore: " +labels: chore +--- + +**Description** + +Clearly describe what change is needed and why. If this changes code then please use another issue type. + +**Requirements** + +- [ ] No functional changes to the code diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/ci.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/ci.md new file mode 100644 index 0000000..fa2dd9e --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/ci.md @@ -0,0 +1,14 @@ +--- +name: Continuous Integration +about: Changes to the CI configuration files and scripts +title: "ci: " +labels: ci +--- + +**Description** + +Describe what changes need to be done to the ci/cd system and why. + +**Requirements** + +- [ ] The ci system is passing diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/config.yml b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ec4bb38 --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false \ No newline at end of file diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/documentation.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/documentation.md new file mode 100644 index 0000000..f494a4d --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/documentation.md @@ -0,0 +1,14 @@ +--- +name: Documentation +about: Improve the documentation so all collaborators have a common understanding +title: "docs: " +labels: documentation +--- + +**Description** + +Clearly describe what documentation you are looking to add or improve. + +**Requirements** + +- [ ] Requirements go here diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/feature_request.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..ddd2fcc --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,18 @@ +--- +name: Feature Request +about: A new feature to be added to the project +title: "feat: " +labels: feature +--- + +**Description** + +Clearly describe what you are looking to add. The more context the better. + +**Requirements** + +- [ ] Checklist of requirements to be fulfilled + +**Additional Context** + +Add any other context or screenshots about the feature request go here. diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/performance.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/performance.md new file mode 100644 index 0000000..699b8d4 --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/performance.md @@ -0,0 +1,14 @@ +--- +name: Performance Update +about: A code change that improves performance +title: "perf: " +labels: performance +--- + +**Description** + +Clearly describe what code needs to be changed and what the performance impact is going to be. Bonus point's if you can tie this directly to user experience. + +**Requirements** + +- [ ] There is no drop in test coverage. diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/refactor.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/refactor.md new file mode 100644 index 0000000..1626c57 --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/refactor.md @@ -0,0 +1,14 @@ +--- +name: Refactor +about: A code change that neither fixes a bug nor adds a feature +title: "refactor: " +labels: refactor +--- + +**Description** + +Clearly describe what needs to be refactored and why. Please provide links to related issues (bugs or upcoming features) in order to help prioritize. + +**Requirements** + +- [ ] There is no drop in test coverage. diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/revert.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/revert.md new file mode 100644 index 0000000..9d121dc --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/revert.md @@ -0,0 +1,16 @@ +--- +name: Revert Commit +about: Reverts a previous commit +title: "revert: " +labels: revert +--- + +**Description** + +Provide a link to a PR/Commit that you are looking to revert and why. + +**Requirements** + +- [ ] Change has been reverted +- [ ] No change in test coverage has happened +- [ ] A new ticket is created for any follow on work that needs to happen diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/style.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/style.md new file mode 100644 index 0000000..02244a7 --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/style.md @@ -0,0 +1,14 @@ +--- +name: Style Changes +about: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc) +title: "style: " +labels: style +--- + +**Description** + +Clearly describe what you are looking to change and why. + +**Requirements** + +- [ ] There is no drop in test coverage. diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/test.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/test.md new file mode 100644 index 0000000..431a7ea --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/test.md @@ -0,0 +1,14 @@ +--- +name: Test +about: Adding missing tests or correcting existing tests +title: "test: " +labels: test +--- + +**Description** + +List out the tests that need to be added or changed. Please also include any information as to why this was not covered in the past. + +**Requirements** + +- [ ] There is no drop in test coverage. diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/PULL_REQUEST_TEMPLATE.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..1169936 --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,27 @@ + + +## Status + +**READY/IN DEVELOPMENT/HOLD** + +## Description + + + +## Type of Change + + + +- [ ] โœจ New feature (non-breaking change which adds functionality) +- [ ] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue) +- [ ] โŒ Breaking change (fix or feature that would cause existing functionality to change) +- [ ] ๐Ÿงน Code refactor +- [ ] โœ… Build configuration change +- [ ] ๐Ÿ“ Documentation +- [ ] ๐Ÿ—‘๏ธ Chore diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/cspell.json b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/cspell.json new file mode 100644 index 0000000..7e41c84 --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/cspell.json @@ -0,0 +1,21 @@ +{ + "version": "0.2", + "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", + "dictionaries": ["vgv_allowed", "vgv_forbidden"], + "dictionaryDefinitions": [ + { + "name": "vgv_allowed", + "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/allowed.txt", + "description": "Allowed VGV Spellings" + }, + { + "name": "vgv_forbidden", + "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/forbidden.txt", + "description": "Forbidden VGV Spellings" + } + ], + "useGitignore": true, + "words": [ + "{{project_name.snakeCase()}}" + ] +} diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/dependabot.yaml b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/dependabot.yaml new file mode 100644 index 0000000..63b035c --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/dependabot.yaml @@ -0,0 +1,11 @@ +version: 2 +enable-beta-ecosystems: true +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "pub" + directory: "/" + schedule: + interval: "daily" diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/workflows/main.yaml b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/workflows/main.yaml new file mode 100644 index 0000000..ddba4fc --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.github/workflows/main.yaml @@ -0,0 +1,25 @@ +name: ci + +concurrency: + group: ${{#mustacheCase}}github.workflow{{/mustacheCase}}-${{#mustacheCase}}github.ref{{/mustacheCase}} + cancel-in-progress: true + +on: + pull_request: + branches: + - main + +jobs: + semantic_pull_request: + uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 + + spell-check: + uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1 + with: + includes: "**/*.md" + modified_files_only: false + + build: + uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 + with: + flutter_channel: stable diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.gitignore b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.gitignore new file mode 100644 index 0000000..06ef8e6 --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/.gitignore @@ -0,0 +1,44 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# VSCode related +.vscode/* + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ +pubspec.lock + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Test related +coverage \ No newline at end of file diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/README.md b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/README.md new file mode 100644 index 0000000..cd51ada --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/README.md @@ -0,0 +1,67 @@ +# {{project_name.titleCase()}} + +[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] +[![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason) +[![License: MIT][license_badge]][license_link] + +{{{description}}} + +## Installation ๐Ÿ’ป + +**โ— In order to start using {{project_name.titleCase()}} you must have the [Flutter SDK][flutter_install_link] installed on your machine.** + +Install via `flutter pub add`: + +```sh +dart pub add {{project_name.snakeCase()}} +``` + +--- + +## Continuous Integration ๐Ÿค– + +{{project_name.titleCase()}} comes with a built-in [GitHub Actions workflow][github_actions_link] powered by [Very Good Workflows][very_good_workflows_link] but you can also add your preferred CI/CD solution. + +Out of the box, on each pull request and push, the CI `formats`, `lints`, and `tests` the code. This ensures the code remains consistent and behaves correctly as you add functionality or make changes. The project uses [Very Good Analysis][very_good_analysis_link] for a strict set of analysis options used by our team. Code coverage is enforced using the [Very Good Workflows][very_good_coverage_link]. + +--- + +## Running Tests ๐Ÿงช + +For first time users, install the [very_good_cli][very_good_cli_link]: + +```sh +dart pub global activate very_good_cli +``` + +To run all unit tests: + +```sh +very_good test --coverage +``` + +To view the generated coverage report you can use [lcov](https://github.com/linux-test-project/lcov). + +```sh +# Generate Coverage Report +genhtml coverage/lcov.info -o coverage/ + +# Open Coverage Report +open coverage/index.html +``` + +[flutter_install_link]: https://docs.flutter.dev/get-started/install +[github_actions_link]: https://docs.github.com/en/actions/learn-github-actions +[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg +[license_link]: https://opensource.org/licenses/MIT +[logo_black]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_black.png#gh-light-mode-only +[logo_white]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_white.png#gh-dark-mode-only +[mason_link]: https://github.com/felangel/mason +[very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg +[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis +[very_good_cli_link]: https://pub.dev/packages/very_good_cli +[very_good_coverage_link]: https://github.com/marketplace/actions/very-good-coverage +[very_good_ventures_link]: https://verygood.ventures +[very_good_ventures_link_light]: https://verygood.ventures#gh-light-mode-only +[very_good_ventures_link_dark]: https://verygood.ventures#gh-dark-mode-only +[very_good_workflows_link]: https://github.com/VeryGoodOpenSource/very_good_workflows diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/analysis_options.yaml b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/analysis_options.yaml new file mode 100644 index 0000000..799268d --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/analysis_options.yaml @@ -0,0 +1 @@ +include: package:very_good_analysis/analysis_options.5.1.0.yaml diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/coverage_badge.svg b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/coverage_badge.svg new file mode 100644 index 0000000..499e98c --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/coverage_badge.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + coverage + coverage + 100% + 100% + + diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/lib/src/{{project_name.snakeCase()}}.dart b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/lib/src/{{project_name.snakeCase()}}.dart new file mode 100644 index 0000000..67c8044 --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/lib/src/{{project_name.snakeCase()}}.dart @@ -0,0 +1,7 @@ +/// {@template {{project_name.snakeCase()}}} +/// {{{description}}} +/// {@endtemplate} +class {{project_name.pascalCase()}} { + /// {@macro {{project_name.snakeCase()}}} + const {{project_name.pascalCase()}}(); +} diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/lib/{{project_name.snakeCase()}}.dart b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/lib/{{project_name.snakeCase()}}.dart new file mode 100644 index 0000000..e95435a --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/lib/{{project_name.snakeCase()}}.dart @@ -0,0 +1,4 @@ +/// {{{description}}} +library {{project_name.snakeCase()}}; + +export 'src/{{project_name.snakeCase()}}.dart'; diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/pubspec.yaml b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/pubspec.yaml new file mode 100644 index 0000000..d8bd474 --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/pubspec.yaml @@ -0,0 +1,18 @@ +name: {{project_name.snakeCase()}} +description: {{{description}}} +version: 0.1.0+1 +{{^publishable}}publish_to: none{{/publishable}} + +environment: + sdk: ">=3.0.0 <4.0.0" + flutter: ">=3.10.0" + +dependencies: + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter + mocktail: ^1.0.0 + very_good_analysis: ^5.1.0 diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/test/src/{{project_name.snakeCase()}}_test.dart b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/test/src/{{project_name.snakeCase()}}_test.dart new file mode 100644 index 0000000..eb53b04 --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/test/src/{{project_name.snakeCase()}}_test.dart @@ -0,0 +1,12 @@ +// ignore_for_file: prefer_const_constructors + +import 'package:flutter_test/flutter_test.dart'; +import 'package:{{project_name.snakeCase()}}/{{project_name.snakeCase()}}.dart'; + +void main() { + group('{{project_name.pascalCase()}}', () { + test('can be instantiated', () { + expect({{project_name.pascalCase()}}(), isNotNull); + }); + }); +} diff --git a/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/{{#publishable}}CHANGELOG.md{{/publishable}} b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/{{#publishable}}CHANGELOG.md{{/publishable}} new file mode 100644 index 0000000..5221ac3 --- /dev/null +++ b/very_good_flutter_package/__brick__/{{project_name.snakeCase()}}/{{#publishable}}CHANGELOG.md{{/publishable}} @@ -0,0 +1,3 @@ +# 0.1.0+1 + +- feat: initial commit ๐ŸŽ‰ diff --git a/very_good_flutter_package/analysis_options.yaml b/very_good_flutter_package/analysis_options.yaml new file mode 100644 index 0000000..41ffce1 --- /dev/null +++ b/very_good_flutter_package/analysis_options.yaml @@ -0,0 +1,3 @@ +analyzer: + exclude: + - __brick__/** diff --git a/very_good_flutter_package/brick.yaml b/very_good_flutter_package/brick.yaml new file mode 100644 index 0000000..bc3a898 --- /dev/null +++ b/very_good_flutter_package/brick.yaml @@ -0,0 +1,24 @@ +name: very_good_flutter_package +description: A Very Good Flutter package created by Very Good Ventures. +repository: https://github.com/VeryGoodOpenSource/very_good_flutter_package +version: 0.4.1 + +environment: + mason: ">=0.1.0-dev.50 <0.1.0" + +vars: + project_name: + type: string + description: The package name + default: my_package + prompt: What is the project name? + description: + type: string + description: The package description + default: A very good flutter package + prompt: What is the project description? + publishable: + type: boolean + description: Whether the generated package is intended to be published. + default: false + prompt: Will the package be published? diff --git a/very_good_flutter_package/config.json b/very_good_flutter_package/config.json new file mode 100644 index 0000000..dbb7e26 --- /dev/null +++ b/very_good_flutter_package/config.json @@ -0,0 +1,5 @@ +{ + "project_name": "test_package", + "description": "A generated Very Good Flutter package.", + "publishable": false +}