Skip to content

Add Shorebird build tool support for Windows packaging#315

Open
kingdomseed wants to merge 2 commits into
YehudaKremer:mainfrom
kingdomseed:main
Open

Add Shorebird build tool support for Windows packaging#315
kingdomseed wants to merge 2 commits into
YehudaKremer:mainfrom
kingdomseed:main

Conversation

@kingdomseed
Copy link
Copy Markdown

Summary

This PR adds comprehensive support for using Shorebird as an alternative build tool for Windows app packaging in the MSIX plugin, addressing both issue #314 in msix and issue #3201 in shorebird.

Issues Addressed

  • msix#314: Add support for Shorebird build tool integration
  • shorebird#3201: Enable Windows packaging workflow compatibility

Changes Made

Core Configuration

  • Added windows_build_tool configuration option (defaults to flutter, supports shorebird)
  • Added shorebird_args configuration for passing arguments to shorebird release windows
  • Added corresponding CLI flags: --windows-build-tool and --shorebird-args

Build System Updates

  • Refactored WindowsBuild class to support multiple build tools
  • Implemented _buildWithShorebird() method that executes shorebird release windows
  • Added _getShorebirdPath() function with smart path resolution (respects SHOREBIRD_BIN environment variable)
  • Maintained backward compatibility with existing Flutter build workflow

Documentation

  • Updated README.md with new configuration options and examples
  • Added comprehensive CHANGELOG entry documenting all new features

Code Quality

  • Fixed analyzer warnings for better code quality
  • Added proper type annotations (void, bool) where missing
  • Comprehensive test coverage for new configuration options

Usage Examples

YAML Configuration

msix_config:
  windows_build_tool: shorebird
  shorebird_args: --verbose --release-version=1.0.0

CLI Usage

flutter pub run msix:create --windows-build-tool=shorebird

Testing

  • Added unit tests for windows_build_tool configuration parsing and validation
  • Added unit tests for shorebird_args parsing from both YAML and CLI
  • Validation ensures only flutter or shorebird are accepted as build tools

Backward Compatibility

This change is fully backward compatible. Existing projects will continue to use Flutter as the default build tool unless explicitly configured otherwise.

How This Solves the Issues

For msix#314: Provides a seamless way for users to opt into Shorebird's Windows build pipeline while maintaining all existing MSIX packaging functionality.

For shorebird#3201: Enables Shorebird users to package their Windows apps as MSIX without manual workarounds, supporting the full shorebird release windows workflow with custom arguments.

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.

1 participant