Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate very_good_flutter_plugin #36

Merged
merged 7 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/.cspell/dart_dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
audioplayers # A Flutter plugin to play multiple simultaneously audio files.
cupertino # Flutter module containing iOS-style widgets.
endtemplate # Dart doc macro used to end a reusable piece of documentation.
fluttium # User flow testing tool for Flutter.
LTWH # From Flutter, abbreviation left, top, width and height.
macos # MacOs, apple's operating system for Mac.
mockingjay # A Flutter package for mocking navigation.
mocktail # A Dart mock package.
pubspec # File name where all the package metadata goes in.
tracefile # File that records the steps of map execution.
unawaited # A Dart function to explicitly ignore a future.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Every request must be reviewed and accepted by:

* @VeryGoodOpenSource/codeowners
* @VeryGoodOpenSource/codeowners
4 changes: 4 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ updates:
directory: "/very_good_wear_app/e2e"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/very_good_flutter_plugin/hooks"
schedule:
interval: "daily"
5 changes: 5 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
description: Changes that affect the Very Good Flutter Package template.
aliases: [very_good_flutter_package]

- name: "product: very_good_flutter_plugin"
color: "553DEC"
description: Changes that affect the Very Good Flutter Plugin template.
aliases: [very_good_flutter_plugin]

- name: "product: very_good_wear_app"
color: "1B03AD"
description: Changes that affect the Very Good Wear App template.
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/very_good_flutter_plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: very_good_flutter_plugin

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
paths:
- .github/workflows/very_good_flutter_plugin.yaml
- "very_good_flutter_plugin/**"
branches:
- main
pull_request:
paths:
- .github/workflows/very_good_flutter_plugin.yaml
- "very_good_flutter_plugin/**"
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"
- "3.x"
platform:
- android
- ios
- linux
- macos
- web
- windows

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
dart pub global activate very_good_cli
rm -rf mason.yaml
mason init
mason add very_good_flutter_plugin --path very_good_flutter_plugin
mason get
mason make very_good_flutter_plugin -c very_good_flutter_plugin/config.json -o output --on-conflict overwrite --platforms ${{ matrix.platform }}

- name: πŸ“¦ Install Dependencies
run: very_good packages get --recursive output

- name: ✨ Check Formatting
if: false
run: dart format --set-exit-if-changed output

- name: πŸ•΅οΈ Analyze
if: false
run: dart analyze --fatal-infos --fatal-warnings output

- name: πŸ§ͺ Run Tests
run: |
cd output
very_good test -j 4 --recursive --optimization --coverage --test-randomize-ordering-seed random

- name: πŸ“‘ Combine Code Coverage
run: |
sudo apt-get -y install lcov
very_good packages get --recursive very_good_flutter_plugin/tool/merge_coverage
cd output
dart run ../very_good_flutter_plugin/tool/merge_coverage/merge_coverage.dart

- name: πŸ“Š Check Code Coverage
uses: VeryGoodOpenSource/very_good_coverage@v2
with:
path: output/coverage/lcov.info
# TODO(alestiago): Remove once the following is solved:
# https://github.com/VeryGoodOpenSource/very_good_flutter_plugin/issues/158
min_coverage: 86
4 changes: 3 additions & 1 deletion mason.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ bricks:
very_good_docs_site:
path: very_good_docs_site
very_good_flame_game:
path: very_good_flame_game
path: very_good_flame_game
very_good_flutter_plugin:
path: very_good_flutter_plugin
55 changes: 55 additions & 0 deletions very_good_flutter_plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
.atom/
.idea/
.vscode/

.packages
.pub/
.dart_tool/
pubspec.lock
flutter_export_environment.sh
coverage/

Podfile.lock
Pods/
.symlinks/
**/Flutter/App.framework/
**/Flutter/ephemeral/
**/Flutter/Flutter.podspec
**/Flutter/Flutter.framework/
**/Flutter/Generated.xcconfig
**/Flutter/flutter_assets/

ServiceDefinitions.json
xcuserdata/
**/DerivedData/

local.properties
keystore.properties
.gradle/
gradlew
gradlew.bat
gradle-wrapper.jar
.flutter-plugins-dependencies
*.iml

generated_plugin_registrant.cc
generated_plugin_registrant.h
generated_plugin_registrant.dart
GeneratedPluginRegistrant.java
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m
GeneratedPluginRegistrant.swift
build/
.flutter-plugins

.project
.classpath
.settings

# Files and directories created by mason
.mason/
mason-lock.json
output/

# Files and directories created by MacOS
.DS_Store
72 changes: 72 additions & 0 deletions very_good_flutter_plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# 0.6.0

- fix: flaky integrated tests
- feat: upgrade to `very_good_analysis ^5.1.0`
- feat: add fluttium test workflow
- docs: add docs for integration tests

# 0.5.0

- feat!: bump min Dart SDK to 3.0.0

# 0.4.0

- feat!: bump min Dart SDK to 2.19.0

# 0.3.3

- chore: fix generator run
- fix: updated regex matching
- chore: support dart sdk 2.18.0

# 0.3.2

- feat: update workflows, dependabot generation, add spellcheck
- fix: integration tests
- feat: use swift in iOS plugin

# 0.3.1

- feat: upgrade to `very_good_analysis 4.0.0`

# 0.3.0

- feat: upgrade to flutter 3.7.1

# 0.2.1

- fix: windows path resolution
- feat: add ci concurrency group to workflow

# 0.2.0

- **BREAKING** feat: add `publishable` flag (defaults to `false`)

# 0.1.2

- docs: remove copyright header and license from generated code

# 0.1.1

- feat: upgrade to Flutter 3.3.2
- feat: upgrade to very_good_analysis 3.1.0

# 0.1.0+1

- docs: minor README updates
- add dependabot integration
- fix broken link to very_good_analysis

# 0.1.0

- feat: upgrade to Flutter 3.3.1
- feat: upgrade to very_good_analysis 3.0.2
- fix: dependabot integration

# 0.0.1+1

- chore: remove duplicate images from README

# 0.0.1

- feat: initial release πŸŽ‰
21 changes: 21 additions & 0 deletions very_good_flutter_plugin/LICENSE
Original file line number Diff line number Diff line change
@@ -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.
78 changes: 78 additions & 0 deletions very_good_flutter_plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Very Good Flutter Plugin

[![Very Good Ventures][logo_white]][very_good_ventures_link]

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 federated Flutter plugin created by Very Good Ventures πŸ¦„.

## What's Included ✨

- βœ… Federated Plugin Architecture
- βœ… Configurable Platforms (Android, iOS, MacOS, Linux, Web, Windows)
- βœ… GitHub Workflow powered by [Very Good Workflows][very_good_workflows_link]
- βœ… Strict lint rules powered by [Very Good Analysis][very_good_analysis_link]
- βœ… Pull Request Template
- βœ… Issue Templates
- βœ… Dependabot Integration
- βœ… 100% Test Coverage
- βœ… Fully Documented Public API
- βœ… MIT License

## Output πŸ“¦

```
β”œβ”€β”€ .github
β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE
β”‚Β Β  └── workflows
β”œβ”€β”€ my_plugin
β”‚Β Β  β”œβ”€β”€ example
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ android
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ integration_test
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ ios
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ lib
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ linux
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ macos
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ test_driver
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ web
β”‚Β Β  β”‚Β Β  └── windows
β”‚Β Β  β”œβ”€β”€ lib
β”‚Β Β  └── test
β”œβ”€β”€ my_plugin_android
β”‚Β Β  β”œβ”€β”€ android
β”‚Β Β  β”œβ”€β”€ lib
β”‚Β Β  └── test
β”œβ”€β”€ my_plugin_ios
β”‚Β Β  β”œβ”€β”€ ios
β”‚Β Β  β”œβ”€β”€ lib
β”‚Β Β  └── test
β”œβ”€β”€ my_plugin_linux
β”‚Β Β  β”œβ”€β”€ lib
β”‚Β Β  β”œβ”€β”€ linux
β”‚Β Β  └── test
β”œβ”€β”€ my_plugin_macos
β”‚Β Β  β”œβ”€β”€ lib
β”‚Β Β  β”œβ”€β”€ macos
β”‚Β Β  └── test
β”œβ”€β”€ my_plugin_platform_interface
β”‚Β Β  β”œβ”€β”€ lib
β”‚Β Β  └── test
β”œβ”€β”€ my_plugin_web
β”‚Β Β  β”œβ”€β”€ lib
β”‚Β Β  └── test
└── my_plugin_windows
β”œβ”€β”€ lib
β”œβ”€β”€ test
└── windows
```

[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
[mason_link]: https://github.com/felangel/mason
[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis
[very_good_ventures_link]: https://verygood.ventures
[very_good_workflows_link]: https://github.com/VeryGoodOpenSource/very_good_workflows
Original file line number Diff line number Diff line change
@@ -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.
Loading
Loading