Skip to content
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
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# editorconfig
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
33 changes: 33 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## Description

*Replace this paragraph with a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change.*

## Related Issues

*Replace this paragraph with a list of issues related to this PR from the [issue database](https://github.com/flutter/flutter/issues). Indicate, which of these issues are resolved or fixed by this PR. Note that you'll have to prefix the issue numbers with flutter/flutter#.*

## Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`).
This will ensure a smooth and quick review process. Updating the `pubspec.yaml` and changelogs is not required.

- [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [ ] My PR includes unit or integration tests for *all* changed/updated/fixed behaviors (See [Contributor Guide]).
- [ ] All existing and new tests are passing.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] The analyzer (`flutter analyze`) does not report any problems on my PR.
- [ ] I read and followed the [Flutter Style Guide].
- [ ] I am willing to follow-up on review comments in a timely manner.

## Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

- [ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
- [ ] No, this is *not* a breaking change.

<!-- Links -->
[issue database]: https://github.com/flutter/flutter/issues
[Contributor Guide]: https://github.com/fluttercommunity/plus_plugins/blob/master/CONTRIBUTING.md
[Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning
100 changes: 100 additions & 0 deletions .github/workflows/all_plugins.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: all_plugins

on:
pull_request:
push:
branches:
- main
paths-ignore:
- 'docs/**'

jobs:
analyze:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- name: 'Install Flutter'
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: 'Install Tools'
run: |
./.github/workflows/scripts/install-tools.sh
flutter pub global activate tuneup
- name: 'Bootstrap Workspace'
run: melos bootstrap
- name: 'Dart Analyze'
run: |
melos exec -c 3 -- \
tuneup check
- name: 'Pub Check'
run: |
melos exec -c 1 --no-private --ignore="*example*" -- \
pub publish --dry-run
format:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- name: 'Install Flutter'
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: 'Install Tools'
run: |
./.github/workflows/scripts/install-tools.sh
curl -sL https://github.com/google/google-java-format/releases/download/google-java-format-1.3/google-java-format-1.3-all-deps.jar -o $HOME/google-java-format.jar
- name: 'Bootstrap Workspace'
run: melos bootstrap
- name: 'Dart'
run: |
melos exec -c 1 -- \
flutter format .
./.github/workflows/scripts/validate-formatting.sh
- name: 'Objective-C'
if: ${{ success() || failure() }}
run: |
melos exec -c 4 --ignore="*platform_interface*" --ignore="*web*" -- \
find . -maxdepth 3 -name "*.h" -o -name "*.m" -print0 \| xargs -0 clang-format -i --style=Google --verbose
./.github/workflows/scripts/validate-formatting.sh
- name: 'Java'
if: ${{ success() || failure() }}
run: |
melos exec -c 4 --ignore="*platform_interface*" --ignore="*web*" -- \
find . -maxdepth 12 -name "*.java" -print0 \| xargs -0 java -jar $HOME/google-java-format.jar --replace
./.github/workflows/scripts/validate-formatting.sh
build_examples_dart:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- name: 'Install Flutter'
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: 'Install Tools'
run: ./.github/workflows/scripts/install-tools.sh
- name: 'Bootstrap Workspace'
run: melos bootstrap
- name: 'Build Example Snapshots'
run: |
melos exec -c 1 --scope="*example*" -- \
flutter build aot
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- name: 'Install Flutter'
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: 'Install Tools'
run: ./.github/workflows/scripts/install-tools.sh
- name: 'Bootstrap Workspace'
run: melos bootstrap
- name: 'Flutter Test'
run: |
melos exec -c 3 --dir-exists=test --ignore="*example*" --ignore="*web*" -- \
flutter test
13 changes: 13 additions & 0 deletions .github/workflows/scripts/install-flutter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

BRANCH=$1

if [ "$BRANCH" == "dev" ]
then
# TODO Flutter dev branch is currently broken so we're unable to test MacOS.
echo "TODO: Skipping macOS testing due to Flutter dev branch issue. Switching branch to stable."
BRANCH=stable
fi

git clone https://github.com/flutter/flutter.git --depth 1 -b $BRANCH _flutter
echo "::add-path::$GITHUB_WORKSPACE/_flutter/bin"
6 changes: 6 additions & 0 deletions .github/workflows/scripts/install-tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

flutter pub global activate melos
echo "::add-path::$HOME/.pub-cache/bin"
echo "::add-path::$GITHUB_WORKSPACE/_flutter/.pub-cache/bin"
echo "::add-path::$GITHUB_WORKSPACE/_flutter/bin/cache/dart-sdk/bin"
30 changes: 30 additions & 0 deletions .github/workflows/scripts/validate-formatting.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
if [[ $(git ls-files --modified) ]]; then
echo ""
echo ""
echo "These files are not formatted correctly:"
for f in $(git ls-files --modified); do
echo ""
echo ""
echo "-----------------------------------------------------------------"
echo "$f"
echo "-----------------------------------------------------------------"
echo ""
git --no-pager diff --unified=0 --minimal $f
echo ""
echo "-----------------------------------------------------------------"
echo ""
echo ""
done
if [[ $GITHUB_WORKFLOW ]]; then
git checkout . > /dev/null 2>&1
fi
echo ""
echo "❌ Some files are incorrectly formatted, see above output."
echo ""
echo "To fix these locally, run: 'melos run format'."
exit 1
else
echo ""
echo "✅ All files are formatted correctly."
fi
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.DS_Store
.atom/
.idea/
.vscode/

.packages
.pub/
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dart.runPubGetOnPubspecChanges": false
}
49 changes: 49 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "melos:bootstrap",
"type": "shell",
"command": "melos bootstrap",
"detail": "Bootstrap this current workspace and link all packages together",
"problemMatcher": []
},
{
"label": "melos:clean",
"type": "shell",
"command": "melos clean",
"detail": "Clean the current workspace and all build & temporary pub files",
"problemMatcher": []
},
{
"label": "melos:run",
"type": "shell",
"command": "melos run",
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
"detail": "Select a script defined in melos.yaml to run",
"problemMatcher": []
},
{
"label": "format",
"type": "shell",
"command": "melos run format",
"detail": "Format all .dart, .h, .m & .java files in the project",
"problemMatcher": []
},
{
"label": "chromedriver",
"isBackground": true,
"type": "shell",
"command": "chromedriver --port=4444",
"detail": "Start a background chromedriver instance port on 4444",
"problemMatcher": []
}
]
}
4 changes: 4 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Majid Hajian <[email protected]>
Simon Lightfoot <[email protected]>
J-P Nurmi <[email protected]>
Miguel Beltran <[email protected]>
Loading