Skip to content

fix: conditionally generate platform jobs in flutter_plugin main workflow#1541

Open
realmeylisdev wants to merge 1 commit intoVeryGoodOpenSource:mainfrom
realmeylisdev:fix/flutter-plugin-platform-jobs
Open

fix: conditionally generate platform jobs in flutter_plugin main workflow#1541
realmeylisdev wants to merge 1 commit intoVeryGoodOpenSource:mainfrom
realmeylisdev:fix/flutter-plugin-platform-jobs

Conversation

@realmeylisdev
Copy link
Contributor

Summary

  • Regenerate the very_good_flutter_plugin bundle with platform-conditional E2E test jobs in the main workflow
  • Only selected platforms are now included in the generated .github/workflows/{project_name}.yaml

Closes #469

Context

When creating a Flutter plugin with specific platforms (e.g., --platforms android,ios), the pre_gen.dart hook correctly sets boolean variables (android: true, ios: true, web: false, etc.). Platform-specific workflow files (e.g., {project_name}_android.yaml) were already correctly wrapped in file-level Mason conditionals. However, the main workflow included E2E test jobs for all 6 platforms unconditionally.

The fix wraps each platform job with {{#platform}}...{{/platform}}, following the same pattern already used for {{#publishable}}pana{{/publishable}} in the same file.

Upstream template fix: VeryGoodOpenSource/very_good_templates#460

Test plan

  • Generate a plugin with --platforms android,ios and verify the main workflow only contains android and ios E2E jobs
  • Generate a plugin with all platforms (default) and verify all 6 jobs are present
  • Verify no regressions in existing template tests

…flow

Regenerate the very_good_flutter_plugin bundle from the fixed template
source that wraps each platform E2E test job with Mason conditionals.

Only selected platforms are now included in the generated main workflow.

Closes VeryGoodOpenSource#469
@realmeylisdev realmeylisdev requested a review from a team as a code owner March 18, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: flutter_plugin generates all platform jobs in main workflow

1 participant