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

Fixed build runner error CI #284

Merged
merged 4 commits into from
Dec 21, 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
5 changes: 3 additions & 2 deletions .github/workflows/analyze_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:

- name: "Run the build_runner and return an error if files are changed"
run: |
melos run-build-runner-all
melos format-all
./scripts/delete_g_files.sh
melos run run-build-runner-init
dart format . --line-length 120
git diff --exit-code
2 changes: 1 addition & 1 deletion app/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# melos_managed_dependency_overrides: mq_analytics,mq_ci_keys,mq_crashlytics,mq_either,mq_home_repository,mq_quran_repository,mq_remote_config,mq_storage,mq_hatim_repository
# melos_managed_dependency_overrides: mq_analytics,mq_ci_keys,mq_crashlytics,mq_either,mq_hatim_repository,mq_home_repository,mq_quran_repository,mq_remote_config,mq_storage
dependency_overrides:
mq_analytics:
path: ../packages/mq_analytics
Expand Down
8 changes: 8 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ scripts:
run: melos exec --depends-on="build_runner" -- flutter pub run build_runner build --delete-conflicting-outputs
description: "Generate code with build_runner"

run-build-runner-clean:
run: melos exec --depends-on="build_runner" -- flutter packages pub run build_runner clean
description: "Generate code with build_runner"

run-build-runner-init:
run: melos exec --depends-on="build_runner" -- flutter pub run build_runner build
description: "Generate code with build_runner"

# Run My Quran
run-app:
run: cd app && flutter run
Expand Down
7 changes: 7 additions & 0 deletions scripts/delete_g_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

find . -type f -name "*.g.dart" -exec rm -v {} +

find . -type f -name "*.gen.dart" -exec rm -v {} +

echo "All .g.dart files have been deleted."
Loading