feat: consolidate templates in monorepo and publish flet pre-releases to pub.dev - #6331
Merged
Conversation
… to pub.dev (#6306) Move flet-build-template and flet-app-templates into sdk/python/templates/, distribute them as zip artifacts on GitHub Releases, and enable pre-release publishing of the flet Flutter package to pub.dev on every main branch commit. - Add build and app templates from external repos (0.83.0 branch) - Set flet dependency to local path for local development - Add PUB_VER (e.g. 0.82.3+7887) to version script for pub.dev - Patch pubspec and publish flet to pub.dev on main branch commits - New build_templates CI job: patches flet version, zips, uploads artifacts - Include template zips in release and dev_release GH artifacts - CLI defaults to zip URL from GH release instead of git repo checkout - Local dev fallback: detect source checkout and use local templates with path dependency override - Update patch_pubspec_version.py: support --exact flag and dependency_overrides - Exclude templates/ from pre-commit hooks (cookiecutter/Jinja syntax) - Update docs, CONTRIBUTING.md, and prepare-flet-release skill Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Import copy and deep-copy the pyproject pubspec before modifying it. Instead of deep-merging dependency sections (which can produce invalid mixed sources like path+git), explicitly transfer "dependencies", "dependency_overrides", and "dev_dependencies" from pyproject into the existing pubspec via pubspec.setdefault(...).update(...). Then merge the remaining pyproject fields and save the pubspec. This prevents invalid combined dependency sources while preserving other pyproject settings.
Remove the 'Publish to pub.dev (Dry Run)' step from .github/workflows/ci.yml. The removed step previously ran `dart pub publish --dry-run` in packages/flet. The workflow now only keeps the actual publish step (triggered on tags or the main branch).
The parent sdk/python/.gitignore had rules for `lib/` and `*.manifest` that were hiding template files from git. Add templates/.gitignore with negations to un-ignore these patterns within the templates directory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Curly braces inside double quotes are literal in bash — the backslash escaping caused the path to not be found. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cookiecutter expects cookiecutter.json at the zip root (or reachable via the directory param). Zipping the parent dir added an extra nesting level that would break template resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extend the stdout protocol between the script and CLI to include the view type, so `flet run` automatically starts the window hidden when the script uses `view=AppView.FLET_APP_HIDDEN` without requiring the `--hidden` flag.
Contributor
There was a problem hiding this comment.
Sorry @FeodorFitsner, your pull request is larger than the review limit of 150000 diff characters
Deploying flet-docs with
|
| Latest commit: |
5b7532b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b04f563d.flet-docs.pages.dev |
| Branch Preview URL: | https://pin-everything.flet-docs.pages.dev |
Deploying flet-examples with
|
| Latest commit: |
5b7532b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://729c0673.flet-examples.pages.dev |
| Branch Preview URL: | https://pin-everything.flet-examples.pages.dev |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #6306
flet-build-templateandflet-app-templatesrepos consolidated intosdk/python/templates/build/andsdk/python/templates/app/fletFlutter package to pub.dev: CI now publishesfletto pub.dev on every main branch push (with+buildnumversion), not just tagged releasesflet-build-template.zipandflet-app-templates.zip, uploaded to GitHub Releases (both dev and tagged)flet buildandflet createdownload template zips from GitHub Releases instead of cloning external repos; local dev fallback detects source checkout and uses path dependenciesdict.update) instead of deep merge to avoid invalid multi-source Dart dependenciesTest plan
flet create test_appfrom source checkout uses local templatesflet build apkfrom source checkout uses local templates with path dependency overridebuild_flet_packagecomputesPUB_VERcorrectlybuild_templatesproduces valid zip artifacts with patched flet version🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com