Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 4 additions & 4 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -327,21 +327,21 @@ targets:
timeout: 30
properties:
target_file: analyze_legacy.yaml
channel: "3.35.7"
channel: "3.38.10"
env_variables: >-
{
"CHANNEL": "3.35.7"
"CHANNEL": "3.38.10"
}

- name: Linux analyze_legacy N-2
recipe: packages/packages
timeout: 30
properties:
target_file: analyze_legacy.yaml
channel: "3.32.8"
channel: "3.35.7"
env_variables: >-
{
"CHANNEL": "3.32.8"
"CHANNEL": "3.35.7"
}

- name: Linux_android custom_package_tests master
Expand Down
2 changes: 1 addition & 1 deletion .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d438df35f998afd21dbab98081a4211305e766a2
82d96ef98a33f3f35dabf7795e701f8a4d2d4bec
2 changes: 1 addition & 1 deletion .ci/flutter_stable.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19074d12f7eaf6a8180cd4036a430c1d76de904e
2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa
3 changes: 2 additions & 1 deletion .ci/scripts/create_all_packages_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ exclusions=("script/configs/exclude_all_packages_app.yaml")
# Add a wasm-specific exclusion file if "--wasm" is specified.
if [[ "$1" == "--wasm" ]]; then
exclusions+=",script/configs/exclude_all_packages_app_wasm.yaml"
shift 1
fi

# Delete ./all_packages if it exists already
rm -rf ./all_packages

dart ./script/tool/bin/flutter_plugin_tools.dart create-all-packages-app \
--output-dir=. --exclude "$exclusions"
--output-dir=. --exclude "$exclusions" "$@"
7 changes: 7 additions & 0 deletions .ci/scripts/enable_swift_package_manager.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# Copyright 2013 The Flutter Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e

flutter config --enable-swift-package-manager
2 changes: 1 addition & 1 deletion .ci/scripts/plugin_tools_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
set -e

cd script/tool
dart pub run test
dart test
7 changes: 3 additions & 4 deletions .ci/targets/ios_build_all_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: download Dart and iOS deps
script: .ci/scripts/tool_runner.sh
args: ["fetch-deps", "--ios", "--supporting-target-platforms-only"]
infra_step: true
- name: create all_packages app
script: .ci/scripts/create_all_packages_app.sh
# build-examples builds with Swift Package Manager, so run build-all without
# it to test both modes in CI.
args: ["--no-swift-package-manager"]
infra_step: true # Note infra steps failing prevents "always" from running.
- name: build all_packages for iOS debug
script: .ci/scripts/build_all_packages_app.sh
Expand Down
6 changes: 5 additions & 1 deletion .ci/targets/ios_platform_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: enable Swift Package Manager
# For consistency between stable and master channels, enable SwiftPM.
# TODO(stuartmorgan): Remove this step once it's the default on stable.
script: .ci/scripts/enable_swift_package_manager.sh
- name: create simulator
script: .ci/scripts/create_simulator.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: download Dart and iOS deps
script: .ci/scripts/tool_runner.sh
args: ["fetch-deps", "--ios", "--supporting-target-platforms-only"]
args: ["fetch-deps", "--ios", "--supporting-target-platforms-only", "--swift-package-manager"]
infra_step: true
- name: build examples
script: .ci/scripts/tool_runner.sh
Expand Down
7 changes: 3 additions & 4 deletions .ci/targets/macos_build_all_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: download Dart and macOS deps
script: .ci/scripts/tool_runner.sh
args: ["fetch-deps", "--macos", "--supporting-target-platforms-only"]
infra_step: true
- name: create all_packages app
script: .ci/scripts/create_all_packages_app.sh
# build-examples builds with Swift Package Manager, so run build-all without
# it to test both modes in CI.
args: ["--no-swift-package-manager"]
infra_step: true # Note infra steps failing prevents "always" from running.
- name: build all_packages for macOS debug
script: .ci/scripts/build_all_packages_app.sh
Expand Down
6 changes: 5 additions & 1 deletion .ci/targets/macos_platform_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: enable Swift Package Manager
# For consistency between stable and master channels, enable SwiftPM.
# TODO(stuartmorgan): Remove this step once it's the default on stable.
script: .ci/scripts/enable_swift_package_manager.sh
- name: download Dart and macOS deps
script: .ci/scripts/tool_runner.sh
args: ["fetch-deps", "--macos", "--supporting-target-platforms-only"]
args: ["fetch-deps", "--macos", "--supporting-target-platforms-only", "--swift-package-manager"]
infra_step: true
- name: build examples
script: .ci/scripts/tool_runner.sh
Expand Down
2 changes: 1 addition & 1 deletion .ci/targets/macos_repo_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ tasks:
always: true
- name: validate iOS and macOS podspecs
script: .ci/scripts/tool_runner.sh
args: ["podspec-check", "--exclude=script/configs/exclude_xcode_deprecation.yaml"]
args: ["podspec-check"]
always: true
2 changes: 1 addition & 1 deletion .ci/targets/repo_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ tasks:
script: .ci/scripts/tool_runner.sh
args:
- "pubspec-check"
- "--min-min-flutter-version=3.32.0"
- "--min-min-flutter-version=3.35.0"
- "--allow-dependencies=script/configs/allowed_unpinned_deps.yaml"
- "--allow-pinned-dependencies=script/configs/allowed_pinned_deps.yaml"
always: true
Expand Down
1 change: 1 addition & 0 deletions .gemini/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ code_review:
# These tend to be verbose, and since we expect PR authors to clearly
# describe their PRs this would be at best duplicative.
summary: false
include_drafts: false
ignore_patterns:
- .ci/flutter_master.version
- .ci/flutter_stable.version
12 changes: 6 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
## Pre-Review Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [ ] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] page, which explains my responsibilities.
- [ ] I read and followed the [relevant style guides] and ran [the auto-formatter].
- [ ] I signed the [CLA].
- [ ] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]`
- [ ] I [linked to at least one issue that this PR fixes] in the description above.
- [ ] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or I have commented below to indicate which [version change exemption] this PR falls under[^1].
- [ ] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or I have commented below to indicate which [CHANGELOG exemption] this PR falls under[^1].
- [ ] I followed [the version and CHANGELOG instructions], using [semantic versioning] and the [repository CHANGELOG style], or I have commented below to indicate which documented exception this PR falls under[^1].
- [ ] I updated/added any relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1].
- [ ] All existing and new tests are passing.
Expand All @@ -24,14 +24,14 @@ If you need help, consider asking for advice on the #hackers-new channel on [Dis

<!-- Links -->
[Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
[AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md
[relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[the auto-formatter]: https://github.com/flutter/packages/blob/main/script/tool/README.md#format-code
[CLA]: https://cla.developers.google.com/
[Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning
[version change exemption]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version
[following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style
[CHANGELOG exemption]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog
[the version and CHANGELOG instructions]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version-and-changelog-updates
[semantic versioning]: https://dart.dev/tools/pub/versioning#semantic-versions
[repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style
[test exemption]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests
12 changes: 12 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
- any-glob-to-any-file:
- third_party/packages/cupertino_icons/**/*

'p: cupertino_ui':
- changed-files:
- any-glob-to-any-file:
- third_party/packages/cupertino_ui/**/*

'p: espresso':
- changed-files:
- any-glob-to-any-file:
Expand Down Expand Up @@ -109,6 +114,11 @@
- any-glob-to-any-file:
- packages/local_auth/**/*

'p: material_ui':
- changed-files:
- any-glob-to-any-file:
- packages/material_ui/**/*

'p: metrics_center':
- changed-files:
- any-glob-to-any-file:
Expand Down Expand Up @@ -266,9 +276,11 @@
- changed-files:
- any-glob-to-any-file:
- packages/animations/**/*
- packages/cupertino_ui/**/*
- packages/flutter_lints/**/*
- packages/go_router/**/*
- packages/go_router_builder/**/*
- packages/google_fonts/**/*
- packages/material_ui/**/*
- packages/two_dimensional_scrollables/**/*
- third_party/packages/cupertino_icons/**/*
65 changes: 65 additions & 0 deletions .github/remove_cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright 2024 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

name: Remove outdated CICD Label

on:
pull_request_target:
types: [synchronize]

permissions:
pull-requests: write
issues: write

jobs:
remove_cicd_label:
if: contains(github.event.pull_request.labels.*.name, 'CICD')
runs-on: ubuntu-latest
steps:
- name: Check if label was added before push
id: check_timing
run: |
# Get push time (commit date of the head SHA)
PUSH_TIME='${{ github.event.pull_request.updated_at }}'
echo "Push time: $PUSH_TIME"

# Get latest CICD labeling event time from the last 100 events
LABEL_TIME=$(gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
timelineItems(last: 100, itemTypes: [LABELED_EVENT]) {
nodes {
... on LabeledEvent {
label { name }
createdAt
}
}
}
}
}
}' -f owner=${{ github.repository_owner }} -f repo=${{ github.event.repository.name }} -F pr=${{ github.event.pull_request.number }} \
--jq '.data.repository.pullRequest.timelineItems.nodes | map(select(.label.name == "CICD")) | last | .createdAt')
echo "Label time: $LABEL_TIME"

if [[ -z "$LABEL_TIME" ]]; then
# Label exists on PR (checked by job 'if') but not in last 100 events -> must be very old
echo "should_remove=true" >> "$GITHUB_OUTPUT"
echo "Result: Label found on PR but not in recent timeline events. Assuming it is old."
elif [[ "$LABEL_TIME" < "$PUSH_TIME" ]]; then
echo "should_remove=true" >> "$GITHUB_OUTPUT"
echo "Result: Label added at $LABEL_TIME is older than push at $PUSH_TIME. Removing."
else
echo "should_remove=false" >> "$GITHUB_OUTPUT"
echo "Result: Label added at $LABEL_TIME is newer than or same as push at $PUSH_TIME. Skipping removal."
fi
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Remove outdated CICD label
if: steps.check_timing.outputs.should_remove == 'true'
run: |
gh pr edit ${{ github.event.pull_request.number }} -R ${{ github.repository }} --remove-label "CICD"
env:
GITHUB_TOKEN: ${{ github.token }}
61 changes: 43 additions & 18 deletions .github/workflows/batch_release_pr.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,68 @@
name: "Creates Batch Release for A Package"
name: "Creates Batch Release for a Package"

on:
repository_dispatch:
types: [batch_release_pr]
types: [batch-release-pr]

jobs:
create_release_pr:
create_batch_release_branch:
runs-on: ubuntu-latest
permissions:
contents: write # Grants write permission to create a branch.
env:
BRANCH_NAME: ${{ github.event.client_payload.package }}-${{ github.run_id }}-${{ github.run_attempt }}
outputs:
branch_created: ${{ steps.check-branch-exists.outputs.exists }}
steps:
- name: checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: "Install Flutter"
uses: ./.github/workflows/internals/install_flutter
- name: Set up tools
run: dart pub get
working-directory: ${{ github.workspace }}/script/tool
# This step is to create a branch for batch release
# A branch may not be created if there is nothing to release.
# In that case, the workflow will exit and complete successfully.
- name: create batch release PR
- name: create batch release branch
run: |
git config --global user.name ${{ secrets.USER_NAME }}
git config --global user.email ${{ secrets.USER_EMAIL }}
dart ./script/tool/lib/src/main.dart branch-for-batch-release --packages=${{ github.event.client_payload.package }} --branch=${{ env.BRANCH_NAME }} --remote=origin
dart ./script/tool/lib/src/main.dart branch-for-batch-release --packages=${GITHUB_EVENT_CLIENT_PAYLOAD_PACKAGE} --branch=${BRANCH_NAME} --remote=origin
env:
GITHUB_EVENT_CLIENT_PAYLOAD_PACKAGE: ${{ github.event.client_payload.package }}
- name: Check if branch was created
id: check-branch-exists
uses: GuillaumeFalourd/branch-exists@v1.1
with:
branch: ${{ env.BRANCH_NAME }}
run: |
if git show-ref --verify --quiet refs/heads/${BRANCH_NAME}; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi

- name: Create Pull Request
if: steps.check-branch-exists.outputs.exists == 'true'
uses: peter-evans/create-pull-request@v7
create_release_pr:
needs: create_batch_release_branch
if: needs.create_batch_release_branch.outputs.branch_created == 'true'
runs-on: ubuntu-latest
permissions:
# The create-pull-request action needs both content and pull-requests permissions.
pull-requests: write
contents: write
env:
BRANCH_NAME: ${{ github.event.client_payload.package }}-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- name: checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "[${{ github.event.client_payload.package }}] Batch release"
title: "[${{ github.event.client_payload.package }}] Batch release"
body: "This PR was created automatically to batch release the `${{ github.event.client_payload.package }}`."
branch: ${{ env.BRANCH_NAME }}
base: release
ref: ${{ env.BRANCH_NAME }}
- name: Create batch release PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create \
--base "release-${{ github.event.client_payload.package }}" \
--head "${{ env.BRANCH_NAME }}" \
--title "[${{ github.event.client_payload.package }}] Batch release" \
--body "This PR was created automatically to batch release the \`${{ github.event.client_payload.package }}\`."


8 changes: 5 additions & 3 deletions .github/workflows/go_router_batch.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: "Creates Batch Release for go_router"

on:
workflow_dispatch:
schedule:
# Run every Monday at 8:00 AM
- cron: "0 8 * * 1"

jobs:
dispatch_release_pr:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v4
uses: peter-evans/repository-dispatch@5fc4efd1a4797ddb68ffd0714a238564e4cc0e6f
with:
token: "${{ secrets.GITHUB_TOKEN }}"
event-type: batch_release_pr
event-type: batch-release-pr
client-payload: '{"package": "go_router"}'
Loading