-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add readme, workflows, author and more structure to plus plugins (#8)
* add readme, workflows, author and more structure to plus plugins * Add exec permissions to workflow scripts * add packages description * update melos
- Loading branch information
Showing
17 changed files
with
813 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
.DS_Store | ||
.atom/ | ||
.idea/ | ||
.vscode/ | ||
|
||
.packages | ||
.pub/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"dart.runPubGetOnPubspecChanges": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]> |
Oops, something went wrong.