This repository has been archived by the owner on May 28, 2024. It is now read-only.
generated from lunofono/.flutter_package_template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit, forked from lunofono (commit 556bed9)
- Loading branch information
0 parents
commit f383d3e
Showing
174 changed files
with
10,575 additions
and
0 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 @@ | ||
codecov: | ||
notify: | ||
wait_for_ci: no | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: auto | ||
threshold: 0% | ||
comment: 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,59 @@ | ||
#!/bin/bash | ||
# | ||
# An example hook script to verify what is about to be committed. | ||
# Called by "git commit" with no arguments. The hook should | ||
# exit with non-zero status after issuing an appropriate message if | ||
# it wants to stop the commit. | ||
# | ||
# To enable this hook, rename this file to "pre-commit". | ||
|
||
if git rev-parse --verify HEAD >/dev/null 2>&1 | ||
then | ||
against=HEAD | ||
else | ||
# Initial commit: diff against an empty tree object | ||
against=$(git hash-object -t tree /dev/null) | ||
fi | ||
|
||
# If you want to allow non-ASCII filenames set this variable to true. | ||
allownonascii=$(git config --type=bool hooks.allownonascii) | ||
|
||
# Redirect output to stderr. | ||
exec 1>&2 | ||
|
||
# Cross platform projects tend to avoid non-ASCII filenames; prevent | ||
# them from being added to the repository. We exploit the fact that the | ||
# printable range starts at the space character and ends with tilde. | ||
if [ "$allownonascii" != "true" ] && | ||
# Note that the use of brackets around a tr range is ok here, (it's | ||
# even required, for portability to Solaris 10's /usr/bin/tr), since | ||
# the square bracket bytes happen to fall in the designated range. | ||
test $(git diff --cached --name-only --diff-filter=A -z $against | | ||
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 | ||
then | ||
cat <<\EOF | ||
Error: Attempt to add a non-ASCII file name. | ||
This can cause problems if you want to work with people on other platforms. | ||
To be portable it is advisable to rename the file. | ||
If you know what you are doing you can disable this check using: | ||
git config hooks.allownonascii true | ||
EOF | ||
exit 1 | ||
fi | ||
|
||
# Run flutter format, analyze and test | ||
( | ||
git stash --include-untracked --keep-index && | ||
trap 'r=$?; git stash pop; exit $r' EXIT | ||
git status | ||
flutter format -n --set-exit-if-changed lib test || exit $? | ||
flutter analyze || exit $? | ||
flutter test || exit $? | ||
) || exit $? | ||
|
||
# If there are whitespace errors, print the offending file names and fail. | ||
exec git diff-index --check --cached $against -- |
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,60 @@ | ||
#!/bin/sh | ||
|
||
# An example hook script to verify what is about to be pushed. Called by "git | ||
# push" after it has checked the remote status, but before anything has been | ||
# pushed. If this script exits with a non-zero status nothing will be pushed. | ||
# | ||
# This hook is called with the following parameters: | ||
# | ||
# $1 -- Name of the remote to which the push is being done | ||
# $2 -- URL to which the push is being done | ||
# | ||
# If pushing without using a named remote those arguments will be equal. | ||
# | ||
# Information about the commits which are being pushed is supplied as lines to | ||
# the standard input in the form: | ||
# | ||
# <local ref> <local sha1> <remote ref> <remote sha1> | ||
# | ||
# This sample shows how to prevent push of commits where the log message starts | ||
# with "WIP" (work in progress). | ||
|
||
remote="$1" | ||
url="$2" | ||
|
||
z40=0000000000000000000000000000000000000000 | ||
|
||
while read local_ref local_sha remote_ref remote_sha | ||
do | ||
if echo "$local_ref" | grep -q '/local/' | ||
then | ||
echo "Found local ref name '$local_ref' has '/local/' in it." >&2 | ||
echo "Not pushing refs with containing that as they are " >&2 | ||
echo "supposed to be local only." >&2 | ||
exit 1 | ||
fi | ||
if [ "$local_sha" = $z40 ] | ||
then | ||
# Handle delete | ||
: | ||
else | ||
if [ "$remote_sha" = $z40 ] | ||
then | ||
# New branch, examine all commits | ||
range="$local_sha" | ||
else | ||
# Update to existing branch, examine new commits | ||
range="$remote_sha..$local_sha" | ||
fi | ||
|
||
# Check for WIP commit | ||
commit=`git rev-list -n 1 --grep '^\(WIP\|fixup!\|squash!\)' "$range"` | ||
if [ -n "$commit" ] | ||
then | ||
echo "Found WIP commit in $local_ref, not pushing" >&2 | ||
exit 1 | ||
fi | ||
fi | ||
done | ||
|
||
exit 0 |
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 @@ | ||
name: automerge | ||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
- unlabeled | ||
- synchronize | ||
- opened | ||
- edited | ||
- ready_for_review | ||
- reopened | ||
- unlocked | ||
pull_request_review: | ||
types: | ||
- submitted | ||
check_suite: | ||
types: | ||
- completed | ||
status: {} | ||
jobs: | ||
automerge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: automerge | ||
uses: "pascalgn/automerge-action@v0.11.0" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
MERGE_DELETE_BRANCH: true | ||
MERGE_REMOVE_LABELS: automerge | ||
UPDATE_METHOD: rebase |
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,65 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
flutter_version: [ "1.20", "1.22" ] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: '12.x' | ||
|
||
- uses: subosito/flutter-action@v1 | ||
with: | ||
flutter-version: ${{ matrix.flutter_version }} | ||
channel: stable | ||
|
||
- name: Install dependencies | ||
run: flutter pub get | ||
|
||
# Analyze step needs different config for pull_request and push, so it is | ||
# duplicated with if conditions to use the correct configuration for each | ||
- name: Analyze (push) | ||
if: ${{ github.event_name == 'push' }} | ||
uses: kitek/dartanalyzer-annotations-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
check_name: test | ||
commit_sha: ${{ github.sha }} | ||
- name: Analyze (pull_request) | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: kitek/dartanalyzer-annotations-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
check_name: test | ||
commit_sha: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Check format | ||
run: flutter format -n --set-exit-if-changed lib test example | ||
|
||
- name: Run unit tests | ||
run: flutter test --coverage | ||
|
||
- name: Upload unit tests coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: coverage/lcov.info | ||
flags: unit,flutter${{ matrix.flutter_version }} | ||
|
||
# vim: set et sw=2 sts=2 : |
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,32 @@ | ||
name: Pub Score | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
pub-score: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: axel-op/dart-package-analyzer@v3 | ||
id: score | ||
with: | ||
githubToken: ${{ github.token }} | ||
- name: Check score | ||
env: | ||
expected_score: 100 | ||
cur_points: ${{ steps.score.outputs.total }} | ||
max_points: ${{ steps.score.outputs.total_max }} | ||
run: | | ||
score=$(( $cur_points * 100 / $max_points )) | ||
if test $score -lt $expected_score | ||
then | ||
exec >&2 | ||
echo "Pub package score is too low." | ||
echo "$expected_score is expected, but we got $score :(" | ||
exit 1 | ||
fi | ||
# vim: set et sw=2 sts=2 : |
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,76 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
build/ | ||
coverage/ | ||
example/pubspec.lock | ||
|
||
# Android related | ||
**/android/**/gradle-wrapper.jar | ||
**/android/.gradle | ||
**/android/captures/ | ||
**/android/gradlew | ||
**/android/gradlew.bat | ||
**/android/local.properties | ||
**/android/**/GeneratedPluginRegistrant.java | ||
|
||
# iOS/XCode related | ||
**/ios/**/*.mode1v3 | ||
**/ios/**/*.mode2v3 | ||
**/ios/**/*.moved-aside | ||
**/ios/**/*.pbxuser | ||
**/ios/**/*.perspectivev3 | ||
**/ios/**/*sync/ | ||
**/ios/**/.sconsign.dblite | ||
**/ios/**/.tags* | ||
**/ios/**/.vagrant/ | ||
**/ios/**/DerivedData/ | ||
**/ios/**/Icon? | ||
**/ios/**/Pods/ | ||
**/ios/**/.symlinks/ | ||
**/ios/**/profile | ||
**/ios/**/xcuserdata | ||
**/ios/.generated/ | ||
**/ios/Flutter/App.framework | ||
**/ios/Flutter/Flutter.framework | ||
**/ios/Flutter/Flutter.podspec | ||
**/ios/Flutter/Generated.xcconfig | ||
**/ios/Flutter/app.flx | ||
**/ios/Flutter/app.zip | ||
**/ios/Flutter/flutter_assets/ | ||
**/ios/Flutter/flutter_export_environment.sh | ||
**/ios/ServiceDefinitions.json | ||
**/ios/Runner/GeneratedPluginRegistrant.* | ||
|
||
# Exceptions to above rules. | ||
!**/ios/**/default.mode1v3 | ||
!**/ios/**/default.mode2v3 | ||
!**/ios/**/default.pbxuser | ||
!**/ios/**/default.perspectivev3 |
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 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: f30b7f4db93ee747cd727df747941a28ead25ff5 | ||
channel: stable | ||
|
||
project_type: app |
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 @@ | ||
## 0.0.1 | ||
|
||
- Initial version. |
Oops, something went wrong.