Skip to content

Commit 2999d73

Browse files
authored
Dart 3.9 / Flutter 3.35 [first LLM release] (#2714)
I got carried away with Gemini and basically rewrote CI and the release process for the new LLM reality. This work was largely completed by Gemini. - Bump all SDK versions to the current beta (3.9.0-0) - Run `flutter channel beta` - Wrote `ci_script.dart` to replace the bash scripts - Converted repository to pub workspace #2499 - Added llm.md and release.md - Added redirect for deprecated Samples Index ## Pre-launch Checklist - [x] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I read the [Contributors Guide]. - [x] I have added sample code updates to the [changelog]. - [x] I updated/added relevant documentation (doc comments with `///`).
1 parent 0aa5415 commit 2999d73

File tree

410 files changed

+28247
-27742
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

410 files changed

+28247
-27742
lines changed

.gemini/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"mcpServers": {
3+
"dart": {
4+
"command": "dart",
5+
"args": [
6+
"mcp-server"
7+
]
8+
}
9+
},
10+
"contextFileName": "/.prompts/llm.md"
11+
}

.github/workflows/beta.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ defaults:
1515
shell: bash
1616

1717
jobs:
18-
# Run the stable test script on the beta channel. Since this branch will soon
19-
# be merged into main as our stable-targeting code, this is the key thing we
20-
# need to test.
21-
stable-tests-on-beta:
18+
# Test all samples on the beta channel. Since the beta channel will soon be
19+
# promoted to stable, this branch is only concerned with the beta.
20+
Beta-CI:
21+
name: Test flutter beta channel
2222
runs-on: ${{ matrix.os }}
2323
if: github.repository == 'flutter/samples'
2424
strategy:
@@ -34,7 +34,7 @@ jobs:
3434
- uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046
3535
with:
3636
channel: beta
37-
- run: ./tool/flutter_ci_script_stable.sh
37+
- run: flutter pub get && dart tool/ci_script.dart
3838

3939
# Verify the Android add-to-app samples build and pass tests with the beta
4040
# channel.
@@ -54,16 +54,16 @@ jobs:
5454

5555
# Verify the iOS add-to-app samples build and pass tests with the beta
5656
# channel.
57-
ios-build:
58-
runs-on: macos-latest
59-
if: github.repository == 'flutter/samples'
60-
steps:
61-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
62-
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00
63-
with:
64-
distribution: 'zulu'
65-
java-version: '17'
66-
- uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046
67-
with:
68-
channel: beta
69-
- run: ./tool/ios_ci_script.sh
57+
# ios-build:
58+
# runs-on: macos-latest
59+
# if: github.repository == 'flutter/samples'
60+
# steps:
61+
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
62+
# - uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00
63+
# with:
64+
# distribution: 'zulu'
65+
# java-version: '17'
66+
# - uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046
67+
# with:
68+
# channel: beta
69+
# - run: ./tool/ios_ci_script.sh

.github/workflows/main.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
flutter_version: [stable, beta, master]
27+
flutter_version: [stable, beta]
2828
os: [ubuntu-latest, macos-latest, windows-latest]
2929
steps:
3030
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -35,7 +35,7 @@ jobs:
3535
- uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046
3636
with:
3737
channel: ${{ matrix.flutter_version }}
38-
- run: ./tool/flutter_ci_script_${{ matrix.flutter_version }}.sh
38+
- run: flutter pub get && dart tool/ci_script.dart
3939

4040
# android-build:
4141
# runs-on: ubuntu-latest
@@ -51,16 +51,16 @@ jobs:
5151
# channel: stable
5252
# - run: ./tool/android_ci_script.sh
5353

54-
ios-build:
55-
runs-on: macos-latest
56-
if: github.repository == 'flutter/samples'
57-
steps:
58-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
59-
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00
60-
with:
61-
distribution: 'zulu'
62-
java-version: '17'
63-
- uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046
64-
with:
65-
channel: stable
66-
- run: ./tool/ios_ci_script.sh
54+
# ios-build:
55+
# runs-on: macos-latest
56+
# if: github.repository == 'flutter/samples'
57+
# steps:
58+
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
59+
# - uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00
60+
# with:
61+
# distribution: 'zulu'
62+
# java-version: '17'
63+
# - uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046
64+
# with:
65+
# channel: stable
66+
# - run: ./tool/ios_ci_script.sh

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
.pub-cache/
2828
.pub/
2929
/build/
30+
**/build/
3031

3132
# Android related
3233
**/gradle-wrapper.jar
@@ -81,3 +82,6 @@ yarn.lock
8182
!**/ios/**/default.pbxuser
8283
!**/ios/**/default.perspectivev3
8384
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
85+
86+
.claude/
87+
logs/

.prompts/code_freshness.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Code Health and Style Guide Analysis
2+
3+
This document provides instructions for an AI assistant to analyze this repository against the Dart and Flutter style guide (`.prompts/llm.md`) and log opportunities for improvement.
4+
5+
## Workflow
6+
7+
The AI assistant must follow these steps exactly:
8+
9+
### 1. Setup
10+
11+
1. **Create Log Directory**: If it does not already exist, create a directory named `logs` in the repository root.
12+
2. **Create Log File**: Create a new file inside the `logs` directory named `YYYY-MM-DD_HH-MM-SS-freshness-scores.md`, where `YYYY-MM-DD_HH-MM-SS` is the current timestamp.
13+
14+
### 2. Project Identification
15+
16+
1. **Find Projects**: Identify all sample projects by searching for `pubspec.yaml` files within the repository. Each directory containing a `pubspec.yaml` should be considered a separate project.
17+
2. **Create a Queue**: Compile a list of the absolute paths to these project directories to process them one by one.
18+
19+
### 3. Analysis Loop
20+
21+
For each project directory identified in the previous step, perform the following:
22+
23+
1. **Check for Dart Files**:
24+
* Verify that the project directory contains at least one `.dart` file.
25+
* If not, add an entry to the log file stating that the project was skipped for this reason and proceed to the next project.
26+
27+
2. **Analyze Git History**:
28+
* Run `git log` to find the most recent commit to a `.dart` file within that project's directory made by a human (i.e., not a bot).
29+
* **Command**:
30+
```bash
31+
git log -1 --author='^(?!.*bot).*$' --pretty="format:%ad" --date=short -- ./**/*.dart
32+
```
33+
*(Note: This command should be run from within the project's directory).*
34+
* **Handle No Commits**: If the command returns no output, note "No human commits found" for the log. If there are no commits at all, note that as well.
35+
36+
3. **Read and Assess Code**:
37+
* Read all `.dart` files within the project directory (recursively).
38+
* Compare the code against the rules and patterns defined in `.prompts/llm.md`.
39+
* The assessment must focus on:
40+
* Code organization and structure.
41+
* Adherence to naming conventions.
42+
* Proper use of Flutter and Dart patterns (e.g., `const` constructors, collection literals).
43+
* State management best practices.
44+
* Clarity, readability, and documentation.
45+
46+
4. **Log Findings**:
47+
* Append a new entry to the log file using the following Markdown template. Ensure all fields are filled out.
48+
49+
```markdown
50+
---
51+
**Sample**: `path/to/sample`
52+
**Last Human Commit**: `YYYY-MM-DD` or "No human commits found"
53+
**Assessment Date**: `YYYY-MM-DD`
54+
55+
**Summary of Style Guide Adherence**:
56+
A brief, one-paragraph summary of how well the project adheres to the style guide. Mention its strengths and weaknesses in general terms.
57+
58+
**Opportunities for Improvement**:
59+
- A concrete, actionable bullet point describing a specific area for improvement.
60+
- Another actionable bullet point.
61+
- A third bullet point, if applicable. Focus on providing clear, specific, and helpful recommendations.
62+
---
63+
```

0 commit comments

Comments
 (0)