Skip to content

Commit 7980d3e

Browse files
authored
Merge branch 'main' into update_contributing_ai
2 parents d6f815a + 0c94262 commit 7980d3e

64 files changed

Lines changed: 1697 additions & 421 deletions

File tree

Some content is hidden

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

.aiconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Gemini Code Assist Configuration
2+
version: 1.0
3+
project:
4+
context:
5+
instruction_files:
6+
- .gemini/styleguide.md
7+
8+
generation_rules:
9+
- "Strictly adhere to the IntelliJ Platform Threading Model: No I/O on the EDT."
10+
- "All generated AnAction classes must be stateless."
11+
- "Apply [MUST-FIX], [CONCERN], and [NIT] severity logic to any code suggestions that violate plugin SDK best practices or style guidelines."
12+
- "Use io.flutter.logging.PluginLogger for all logging; avoid System.out."
13+
- "Always include the standard Chromium Authors copyright header in new files."
14+
- "Adhere to the Zero-Formatting Policy: Do not comment on indentation, spacing, or brace placement."
15+
# Ensure local agents read styleguide files automatically.
16+
- "At the start of the session, read and adhere to the guidelines in all files listed in project.context.instruction_files."
17+
18+
languages:
19+
- java
20+
- kotlin
21+
- dart

.gemini/styleguide.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ enforce standard modern Java/Kotlin coding conventions, but strictly police the
1313
- `[NIT]`: Idiomatic improvements or minor naming suggestions.
1414
- **Focus:** Prioritize logic, performance on the UI thread, and architectural consistency.
1515
- **No Empty Praise:** Do not leave "Looks good" or "Nice change" comments. If there are no issues, leave no comments.
16+
- **Copyright Headers:** Ensure all new files have a proper copyright header (e.g., `Copyright 2026 The Chromium Authors`). Flag any missing
17+
headers as `[MUST-FIX]`.
1618

1719
## 2. IntelliJ Platform Best Practices
1820

@@ -30,9 +32,10 @@ enforce standard modern Java/Kotlin coding conventions, but strictly police the
3032
as recommended by the modern SDK.
3133
- **Backward Compatibility:** Avoid using `@ApiStatus.Internal` or `@ApiStatus.ScheduledForRemoval` APIs unless strictly necessary.
3234
- **Logging:**
33-
- Reject any use of `System.out.println` or `System.err.println` for logging.
34-
- Enforce the use of the IntelliJ SDK's built-in logger: `com.intellij.openapi.diagnostic.Logger` or our own: `
35-
io.flutter.logging.PluginLogger.
35+
- Reject any use of `System.out.println` or `System.err.println` for logging in `src/` code (integration tests may use them for
36+
milestone logging).
37+
- Enforce the use of the IntelliJ SDK's built-in logger (`com.intellij.openapi.diagnostic.Logger`) or our own (
38+
`io.flutter.logging.PluginLogger`).
3639
- **Actions:**
3740
- Classes extending `AnAction` must be completely stateless. Flag any `AnAction` class that defines mutable instance variables (fields),
3841
as the platform instantiates a single instance of the action for the lifetime of the IDE.
@@ -71,4 +74,5 @@ enforce standard modern Java/Kotlin coding conventions, but strictly police the
7174
- **DRY:** Identify blocks of code that are 90%+ identical to existing utility methods in this repo and flag them for duplication.
7275
- **Meaningful Naming:** Variables should describe their intent (e.g., `timeoutInMs` instead of `t`).
7376
- **Descriptive Pull Request:** Contributors should include the information recommended in the pull request template (In
74-
`.github/PULL_REQUEST_TEMPLATE.md`Ï)
77+
`.github/PULL_REQUEST_TEMPLATE.md`Ï)
78+
- **Changelog Entries:** Enforce that there is a changelog entry for all user-facing changes. Entries must strictly match the existing grammatical style using descriptive, state-based phrases (typically starting with gerunds, nouns, or verbs like *Avoid* / *Support* / *Log* / *Prevent*) rather than starting with the imperative verb *Fix* or *Add*.

.github/dependabot.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# See Dependabot documentation for all configuration options:
2-
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3-
41
version: 2
52
updates:
63
- package-ecosystem: "github-actions"
@@ -9,8 +6,17 @@ updates:
96
interval: "weekly"
107
labels:
118
- "autosubmit"
9+
- "kokoro:run"
1210
# Updating patch versions for "github-actions" is too chatty.
1311
# See https://github.com/flutter/flutter/issues/158350.
1412
ignore:
1513
- dependency-name: "*"
1614
update-types: ["version-update:semver-patch"]
15+
16+
- package-ecosystem: "gradle"
17+
directory: "/"
18+
schedule:
19+
interval: "weekly"
20+
labels:
21+
- "autosubmit"
22+
- "kokoro:run"

.github/workflows/presubmit.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: checkout
23-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
2424
- name: build
2525
run: ./tool/github.sh
2626
checker:
@@ -31,13 +31,13 @@ jobs:
3131
bot: [CHECK_BOT, DART_BOT, UNIT_TEST_BOT, VERIFY_BOT]
3232
steps:
3333
- name: checkout
34-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
34+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
3535
- name: Linux ${{ matrix.bot }}
3636
run: ./tool/github.sh
3737
env:
3838
BOT: ${{ matrix.bot }}
3939
- name: upload build artifacts
40-
uses: actions/upload-artifact@v6
40+
uses: actions/upload-artifact@v7
4141
if: always()
4242
with:
4343
name: build-${{ matrix.bot }}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Copyright 2026 The Chromium Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
name: Update Flutter SDK Pin
6+
7+
on:
8+
schedule:
9+
- cron: '0 0 * * 1' # Run every Monday at midnight UTC
10+
workflow_dispatch: # Allow manual execution from the Actions tab
11+
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
jobs:
17+
check-and-update:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout Repository
21+
uses: actions/checkout@v6
22+
with:
23+
token: ${{ secrets.FLUTTERACTIONSBOT_CP_TOKEN }}
24+
25+
- name: Check for New Flutter stable version
26+
id: check-version
27+
run: |
28+
# 1. Retrieve the current pinned version from the shared script
29+
CURRENT_VERSION=$(grep -E 'FLUTTER_VERSION="[0-9.]+"' tool/provision_flutter.sh | head -n 1 | cut -d'"' -f2)
30+
echo "Current pinned version: $CURRENT_VERSION"
31+
32+
# 2. Retrieve the latest stable version from Flutter's official releases manifest
33+
LATEST_VERSION=$(curl -s https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json | jq -r '.releases | map(select(.channel == "stable"))[0].version')
34+
echo "Latest stable version: $LATEST_VERSION"
35+
36+
# 3. Compare and update if a newer version is available
37+
if [ "$CURRENT_VERSION" != "$LATEST_VERSION" ]; then
38+
echo "New Flutter stable version detected: $LATEST_VERSION"
39+
sed -i -e "s/FLUTTER_VERSION=\"$CURRENT_VERSION\"/FLUTTER_VERSION=\"$LATEST_VERSION\"/g" tool/provision_flutter.sh
40+
echo "updated=true" >> $GITHUB_OUTPUT
41+
echo "latest_version=$LATEST_VERSION" >> $GITHUB_OUTPUT
42+
else
43+
echo "Flutter SDK is already up to date."
44+
echo "updated=false" >> $GITHUB_OUTPUT
45+
fi
46+
47+
- name: Create Pull Request for Version Bump
48+
if: steps.check-version.outputs.updated == 'true'
49+
uses: peter-evans/create-pull-request@v8
50+
with:
51+
token: ${{ secrets.FLUTTERACTIONSBOT_CP_TOKEN }}
52+
push-to-fork: flutteractionsbot/flutter-intellij
53+
committer: flutteractionsbot <flutter-actions-bot@google.com>
54+
author: flutteractionsbot <flutter-actions-bot@google.com>
55+
commit-message: "ci: bump pinned Flutter SDK to version ${{ steps.check-version.outputs.latest_version }}"
56+
title: "ci: bump pinned Flutter SDK to version ${{ steps.check-version.outputs.latest_version }}"
57+
body: |
58+
An automated check has detected a new stable release of the Flutter SDK.
59+
60+
* **New Pinned Version**: `${{ steps.check-version.outputs.latest_version }}`
61+
62+
This Pull Request updates our shared provisioning script (`tool/provision_flutter.sh`) to target this version. All presubmit tests will be run against this version to verify compatibility.
63+
branch: "auto-update-flutter-sdk"
64+
delete-branch: true
65+
labels: |
66+
dependencies
67+
ci

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
.vscode/
2222
.sandbox/
2323
artifacts/
24+
/bin/
2425
build/
2526
flutter-gui-tests/.gradle/
2627
flutter-gui-tests/guitest.log

AUTHORS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ Eli Albert <crasowas@gmail.com>
2525
Mohamed El Sayed <devblooming@tutanota.com>
2626
Edwin Ludik <edwin.ludik@gmail.com>
2727
Japnit Singh <truejswalia@gmail.com>
28+
Dmitry Kandalov <dmitry.kandalov@gmail.com>
29+
Kazuya Chikamatsu <kazu.chika.shima@gmail.com>
30+
Dustin Feucht <code.nopjar@gmail.com>
31+
Nico Mexis <nicomexis.nm@gmail.com>
32+
Luke Memet <lukememet@gmail.com>

CHANGELOG.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,43 @@
22

33
### Added
44

5+
- Missing platforms and targets to Build menu.
6+
57
### Changed
68

7-
- Updated gradle plugin version to re-enable running `./gradlew verifyPlugin` locally. (#8847)
9+
### Removed
10+
11+
### Fixed
12+
- Restored device labels on split-debugger run tabs in IntelliJ IDEA 2025.3+. (#8908)
13+
14+
## 92.0.0
15+
16+
### Added
17+
18+
- Option to specify the pub root module for Flutter Widget Previewer. (#8888)
19+
20+
### Changed
821

922
### Removed
1023

24+
### Fixed
25+
- Silent failure when opening Flutter projects without `.idea` directory in IntelliJ IDEA, by removing `FlutterProjectOpenProcessor` and
26+
migrating configuration logic to `FlutterInitializer`. (#8903)
27+
- IDE focus loss when running in full screen mode. (#8906)
28+
- Excessive toolbar updates causing exceptions in Android Studio, by making device selector updates targeted instead of global. (#8891)
29+
30+
## 91.0.0
31+
32+
### Changed
33+
34+
- Gradle plugin version to re-enable running `./gradlew verifyPlugin` locally. (#8847)
35+
1136
### Fixed
1237

13-
- Silent failure when opening Flutter projects without `.idea` directory in IntelliJ IDEA, by removing `FlutterProjectOpenProcessor` and migrating configuration logic to `FlutterInitializer`. (#8845)
38+
- Gutter buttons not running tests with non-ASCII characters in their names. (#8838)
39+
- Freeze from JX Browser close. (#8864)
40+
- Crash in split debugger mode in IntelliJ 2025.3+. (#8878)
41+
- Passing additional arguments from the Flutter test template. (#8836)
1442

1543
## 90.0.0
1644

CLAUDE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Flutter IntelliJ Plugin — Claude Code Guide
2+
3+
@.gemini/styleguide.md
4+
5+
## Additional Rules
6+
7+
- No I/O or heavy computation on the EDT (IntelliJ Threading Model).
8+
- All `AnAction` subclasses must be stateless (no mutable instance fields).
9+
- Use `io.flutter.logging.PluginLogger` (or IntelliJ's `Logger`) for all logging; never `System.out`.
10+
- All new files must include the standard Chromium Authors copyright header.
11+
- Zero-Formatting Policy: do not comment on indentation, spacing, or brace placement.
12+
- Categorize code suggestions with `[MUST-FIX]`, `[CONCERN]`, or `[NIT]` severity prefixes.

CONTRIBUTING.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ PRs prepared using AI tools must follow these requirements:
8080
## Environment set-up
8181

8282
1. Install the latest [Java Development Kit](https://www.java.com/en/download/).
83-
- The current Java Development Kit version is: **23**.
8483
- **[Googlers only]** Install Java from go/softwarecenter instead.
8584

8685
2. Set your `JAVA_HOME` directory in the configuration file for your shell environment.
@@ -255,6 +254,23 @@ PRs prepared using AI tools must follow these requirements:
255254
- Expand `Edit configuration templates...` and verify that Flutter is present.
256255
- Click [+] and verify that Flutter is present.
257256
257+
### Running against custom target IDEs
258+
259+
To test or debug the plugin against a different IDE target (like IntelliJ IDEA Community or Ultimate) without changing the project's compilation target, you can use the custom `runTarget` Gradle task.
260+
261+
Run it from the command line specifying the target IDE and version:
262+
```bash
263+
./gradlew runTarget -Pide=IntelliJ -PideV=2025.1
264+
```
265+
266+
* **`-Pide`**: Valid values are `AndroidStudio` (default), `IntelliJ` (Community), and `Ultimate`.
267+
* **`-PideV`**: Any valid version string or build number for the selected IDE.
268+
269+
To see a full list of available options and usage examples, run the task without any parameters:
270+
```bash
271+
./gradlew runTarget
272+
```
273+
258274
## Provision Tool
259275
260276
This is not currently required. However, for debugging unit tests, it may be handy; please ignore for now.

0 commit comments

Comments
 (0)