Skip to content

Commit

Permalink
Merge pull request #256 from PSDTools/thin-deps
Browse files Browse the repository at this point in the history
Remove Dependencies
  • Loading branch information
lishaduck authored Feb 2, 2024
2 parents 1da28e3 + 0b13cbd commit 0a6458c
Show file tree
Hide file tree
Showing 39 changed files with 484 additions and 1,280 deletions.
42 changes: 0 additions & 42 deletions .devcontainer/devcontainer.json

This file was deleted.

104 changes: 63 additions & 41 deletions .github/workflows/dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,33 +59,19 @@ jobs:
path: |
.dart_tool/
lib/gen/*.gen.dart
lib/**/*.g.dart
lib/**/*.gr.dart
lib/**/*.gm.dart
lib/**/*.freezed.dart
lib/features/**/*.g.dart
lib/features/**/*.freezed.dart
lib/utils/*.g.dart
lib/utils/*.freezed.dart
lib/app/*.gr.dart
lib/app/*.gm.dart
lib/l10n/app_localizations.dart
lib/l10n/app_localizations_*.dart
lib/widgetbook.generator.*.dart
key: ${{ runner.os }}-${{ env.FLUTTER_CHANNEL }}-dart-${{ hashFiles('**/build.yaml') }}
- name: 🔌 Generate files
run: |
flutter gen-l10n
dart run dart_define generate
dart run build_runner build -d
- name: ⚙️ Upload generated files
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: generated-files
path: |
lib/gen/*.gen.dart
lib/**/*.g.dart
lib/**/*.gr.dart
lib/**/*.gm.dart
lib/**/*.freezed.dart
lib/l10n/app_localizations.dart
lib/l10n/app_localizations_*.dart
lib/widgetbook.generator.*.dart
if-no-files-found: error
build:
name: Build
Expand Down Expand Up @@ -137,16 +123,28 @@ jobs:
run: flutter --disable-analytics
- name: 📦 Install dependencies
run: flutter pub get
- name: ⚙️ Download generated code
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
- name: ⚙️ Cache generated files
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
name: generated-files
path: lib
- name: 🔌 Generate dart-defines
run: dart run dart_define generate
path: |
.dart_tool/
lib/gen/*.gen.dart
lib/features/**/*.g.dart
lib/features/**/*.freezed.dart
lib/utils/*.g.dart
lib/utils/*.freezed.dart
lib/app/*.gr.dart
lib/app/*.gm.dart
lib/l10n/app_localizations.dart
lib/l10n/app_localizations_*.dart
key: ${{ runner.os }}-${{ env.FLUTTER_CHANNEL }}-dart-${{ hashFiles('**/build.yaml') }}
- name: 🔌 Generate files
run: |
flutter gen-l10n
dart run build_runner build -d
- name: 🔧 Build
run: |
flutter build ${{ matrix.target }} ${{ matrix.flutter-flags }} --dart-define-from-file=dart_define.json
flutter build ${{ matrix.target }} ${{ matrix.flutter-flags }}
# - name: ⚙️ Upload build
# if: matrix.target == 'web'
# uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
Expand Down Expand Up @@ -179,17 +177,29 @@ jobs:
run: flutter --disable-analytics
- name: 📦 Install dependencies
run: flutter pub get
- name: ⚙️ Download generated code
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
- name: ⚙️ Cache generated files
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
name: generated-files
path: lib
- name: 🔌 Generate dart-defines
run: dart run dart_define generate
path: |
.dart_tool/
lib/gen/*.gen.dart
lib/features/**/*.g.dart
lib/features/**/*.freezed.dart
lib/utils/*.g.dart
lib/utils/*.freezed.dart
lib/app/*.gr.dart
lib/app/*.gm.dart
lib/l10n/app_localizations.dart
lib/l10n/app_localizations_*.dart
key: ${{ runner.os }}-${{ env.FLUTTER_CHANNEL }}-dart-${{ hashFiles('**/build.yaml') }}
- name: 🔌 Generate files
run: |
flutter gen-l10n
dart run build_runner build -d
- name: 🕵️ Analyze project source
run: flutter analyze --fatal-infos
- name: 🕵️ Lint Riverpod
run: dart run custom_lint
- name: 🕵️ Run Custom Lint Rules
run: dart run custom_lint --fatal-infos

test:
name: Testing
Expand All @@ -215,13 +225,25 @@ jobs:
run: flutter --disable-analytics
- name: 📦 Install dependencies
run: flutter pub get
- name: ⚙️ Download generated code
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
- name: ⚙️ Cache generated files
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
name: generated-files
path: lib
- name: 🔌 Generate dart-defines
run: dart run dart_define generate
path: |
.dart_tool/
lib/gen/*.gen.dart
lib/features/**/*.g.dart
lib/features/**/*.freezed.dart
lib/utils/*.g.dart
lib/utils/*.freezed.dart
lib/app/*.gr.dart
lib/app/*.gm.dart
lib/l10n/app_localizations.dart
lib/l10n/app_localizations_*.dart
key: ${{ runner.os }}-${{ env.FLUTTER_CHANNEL }}-dart-${{ hashFiles('**/build.yaml') }}
- name: 🔌 Generate files
run: |
flutter gen-l10n
dart run build_runner build -d
- name: 🧪 Run tests
run: dart run very_good_cli:very_good test --coverage --test-randomize-ordering-seed random
- name: 📊 Check code coverage
Expand Down
41 changes: 27 additions & 14 deletions .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,29 @@ permissions:

jobs:
spell-check:
name: Check spelling
name: Check Spelling
needs: []
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@b7d3a7d287a7ed1f996861a73d69eafdfd7ed60e # v1.14.0
runs-on: ubuntu-latest

with:
includes: |
**/*.md
**/*.dart
**/*.yaml
**/*.toml
**/*.json
modified_files_only: false
config: cspell.json
steps:
- name: 📚 Git Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
clean: true
persist-credentials: false
set-safe-directory: true

- name: 🪄 Spell Check
uses: streetsidesoftware/cspell-action@d4c3df16cdd0faebccb1711178a8a490966f61b9 # v5.0.1
with:
files: |
**/*.md
**/*.dart
**/*.yaml
**/*.toml
**/*.json
incremental_files_only: false

link-check:
name: Check Links
Expand All @@ -64,11 +74,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: 📚 Git checkout
- name: 📚 Git Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
- name: 🪄 Markdown linting
submodules: recursive
clean: true
persist-credentials: false
set-safe-directory: true
- name: 🕵️ Markdown linting
uses: DavidAnson/markdownlint-cli2-action@510b996878fc0d1a46c8a04ec86b06dbfba09de7 # v15.0.0
id: markdownlint
with:
Expand Down
25 changes: 0 additions & 25 deletions .replit

This file was deleted.

4 changes: 0 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@
"circlecodesolution.ccs-flutter-color",
"lsaudon.l10nization",
"google.arb-editor",
"tamasfe.even-better-toml",
"redhat.vscode-yaml",
"sndst00m.vscode-native-svg-preview",
"ms-vsliveshare.vsliveshare",
"eamodio.gitlens",
"bbenoist.nix",
"streetsidesoftware.code-spell-checker",
"esbenp.prettier-vscode",
"foam.foam-vscode",
"tyriar.luna-paint",
"pflannery.vscode-versionlens",
"streetsidesoftware.code-spell-checker-spanish",
"joshbolduc.commitlint"
Expand Down
9 changes: 0 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,7 @@
"request": "launch",
"type": "dart",
"program": "lib/main.dart",
"args": ["--dart-define-from-file=dart_define.json"],
"flutterMode": "debug"
},
{
"name": "Launch widgetbook",
"request": "launch",
"type": "dart",
"program": "lib/widgetbook.generator.dart",
"args": ["--dart-define-from-file=dart_define.json"],
"flutterMode": "release"
}
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"*.dart": "${capture}.*.dart, ${capture}_*.dart",
"*cspell.json": ".markdownlint*, project_words.txt, mlc_config.json",
".flutter-plugins": ".flutter-plugins-dependencies",
"dart_define.json": "*.log, untranslated.json",
"untranslated.json": "*.log",
".env": ".env.example",
"app.iml": "*.iml"
},
Expand Down
21 changes: 1 addition & 20 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,7 @@
"color": "terminal.ansiCyan",
"id": "gear"
},
"dependsOn": ["Dart: run dart_define", "Flutter: gen-l10n"]
},
{
"type": "dart",
"command": "dart",
"cwd": ".",
"args": ["run", "dart_define", "generate"],
"problemMatcher": [],
"group": "build",
"label": "Dart: run dart_define",
"detail": "Generate dart-defines.",
"runOptions": {
"runOn": "folderOpen"
},
"icon": {
"color": "terminal.ansiMagenta",
"id": "gear"
}
"dependsOn": ["Flutter: gen-l10n"]
},
{
"type": "dart",
Expand All @@ -60,7 +43,6 @@
"build",
"${input:target}",
"--release",
"--dart-define-from-file=dart_define.json"
],
"problemMatcher": [],
"group": "build",
Expand Down Expand Up @@ -91,7 +73,6 @@
"build",
"${input:target}",
"--release",
"--dart-define-from-file=dart_define.json"
],
"problemMatcher": [],
"group": "build",
Expand Down
21 changes: 6 additions & 15 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,18 @@ targets:
# configs for the flutter.assets generator
generate_for:
- $package$
source_gen:combining_builder:
# configs for the source_gen:combining_builder generator
generate_for:
- lib/**.dart
json_serializable:
# configs for the @JsonSerializable generator
generate_for:
- lib/features/*/domain/*_model.dart
- lib/features/*/domain/*_entity.dart
widgetbook_generator:app_builder:
# configs for @App() generator...
generate_for:
- lib/widgetbook.generator.dart
widgetbook_generator:use_case_builder:
# configs for @UseCase() generator...
generate_for:
- lib/widgets/*/*.dart
widgetbook_generator:telemetry:
# disable widgetbook telemetry...
enabled: false
build_version:build_version:
# configs for the packageVersion generator...
options:
output: lib/gen/version.gen.dart
envied_generator:envied:
# configs for the @Envied generator
generate_for:
- lib/env/env.dart
options:
output: lib/gen/env.g.dart
Loading

0 comments on commit 0a6458c

Please sign in to comment.