Skip to content

Commit 1203081

Browse files
authored
Merge branch 'main' into main
2 parents 751eb14 + 816a59e commit 1203081

31 files changed

Lines changed: 558 additions & 289 deletions

.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: 6 additions & 2 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,8 +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 in `src/` code (integration tests may use them for milestone logging).
34-
- Enforce the use of the IntelliJ SDK's built-in logger (`com.intellij.openapi.diagnostic.Logger`) or our own (`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`).
3539
- **Actions:**
3640
- Classes extending `AnAction` must be completely stateless. Flag any `AnAction` class that defines mutable instance variables (fields),
3741
as the platform instantiates a single instance of the action for the lifetime of the IDE.

.github/dependabot.yml

Lines changed: 7 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"
@@ -14,3 +11,10 @@ updates:
1411
ignore:
1512
- dependency-name: "*"
1613
update-types: ["version-update:semver-patch"]
14+
15+
- package-ecosystem: "gradle"
16+
directory: "/"
17+
schedule:
18+
interval: "weekly"
19+
labels:
20+
- "autosubmit"

.github/workflows/presubmit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
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 }}

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ Edwin Ludik <edwin.ludik@gmail.com>
2727
Japnit Singh <truejswalia@gmail.com>
2828
Dmitry Kandalov <dmitry.kandalov@gmail.com>
2929
Kazuya Chikamatsu <kazu.chika.shima@gmail.com>
30+
Dustin Feucht <code.nopjar@gmail.com>
3031
Nico Mexis <nicomexis.nm@gmail.com>

CHANGELOG.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,42 @@
22

33
### Added
44

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

7-
- Updated gradle plugin version to re-enable running `./gradlew verifyPlugin` locally. (#8847)
8-
- Added missing platforms and targets to Build menu.
9+
### Removed
10+
11+
### Fixed
12+
13+
## 92.0.0
14+
15+
### Added
16+
17+
- Option to specify the pub root module for Flutter Widget Previewer. (#8888)
18+
19+
### Changed
920

1021
### Removed
1122

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

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

1842
## 90.0.0
1943

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
@@ -58,7 +58,6 @@ name and contact info to the [AUTHORS](AUTHORS) file.
5858
## Environment set-up
5959

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

6463
2. Set your `JAVA_HOME` directory in the configuration file for your shell environment.
@@ -233,6 +232,23 @@ name and contact info to the [AUTHORS](AUTHORS) file.
233232
- Expand `Edit configuration templates...` and verify that Flutter is present.
234233
- Click [+] and verify that Flutter is present.
235234
235+
### Running against custom target IDEs
236+
237+
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.
238+
239+
Run it from the command line specifying the target IDE and version:
240+
```bash
241+
./gradlew runTarget -Pide=IntelliJ -PideV=2025.1
242+
```
243+
244+
* **`-Pide`**: Valid values are `AndroidStudio` (default), `IntelliJ` (Community), and `Ultimate`.
245+
* **`-PideV`**: Any valid version string or build number for the selected IDE.
246+
247+
To see a full list of available options and usage examples, run the task without any parameters:
248+
```bash
249+
./gradlew runTarget
250+
```
251+
236252
## Provision Tool
237253
238254
This is not currently required. However, for debugging unit tests, it may be handy; please ignore for now.

build.gradle.kts

Lines changed: 72 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ plugins {
4040
// https://plugins.gradle.org/plugin/org.jetbrains.intellij.platform
4141
// https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm
4242
id("java") // Java support
43-
id("org.jetbrains.intellij.platform") version "2.12.0" // IntelliJ Platform Gradle Plugin
44-
id("org.jetbrains.kotlin.jvm") version "2.2.0" // Kotlin support
45-
id("org.jetbrains.changelog") version "2.2.0" // Gradle Changelog Plugin
46-
id("org.jetbrains.kotlinx.kover") version "0.9.4"
43+
alias(libs.plugins.intellij.platform) // IntelliJ Platform Gradle Plugin
44+
alias(libs.plugins.kotlin.jvm) // Kotlin support
45+
alias(libs.plugins.changelog) // Gradle Changelog Plugin
46+
alias(libs.plugins.kover)
4747
idea // IntelliJ IDEA support
4848
}
4949

@@ -239,13 +239,13 @@ dependencies {
239239
pluginVerifier()
240240
}
241241

242-
compileOnly("org.jetbrains:annotations:24.0.0")
243-
testImplementation("org.jetbrains:annotations:24.0.0")
244-
compileOnly("com.google.guava:guava:32.0.1-android")
245-
compileOnly("com.google.code.gson:gson:2.10.1")
246-
testImplementation("com.google.guava:guava:32.0.1-jre")
247-
testImplementation("com.google.code.gson:gson:2.10.1")
248-
testImplementation("junit:junit:4.13.2")
242+
compileOnly(libs.jetbrains.annotations)
243+
testImplementation(libs.jetbrains.annotations)
244+
compileOnly(libs.guava.android)
245+
compileOnly(libs.gson)
246+
testImplementation(libs.guava.jre)
247+
testImplementation(libs.gson)
248+
testImplementation(libs.junit)
249249
implementation(
250250
fileTree(
251251
mapOf(
@@ -256,12 +256,12 @@ dependencies {
256256
)
257257

258258
// UI Test dependencies
259-
integrationImplementation("org.kodein.di:kodein-di-jvm:7.26.1")
260-
integrationImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
259+
integrationImplementation(libs.kodein.di)
260+
integrationImplementation(libs.kotlinx.coroutines)
261261

262262
// JUnit 5 is required for UI tests
263-
integrationImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
264-
integrationRuntimeOnly("org.junit.platform:junit-platform-launcher")
263+
integrationImplementation(libs.junit.jupiter)
264+
integrationRuntimeOnly(libs.junit.platform.launcher)
265265
}
266266

267267
intellijPlatform {
@@ -389,12 +389,20 @@ tasks {
389389
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-faq.html#how-to-check-the-latest-available-eap-release
390390
tasks {
391391
printProductsReleases {
392-
channels = listOf(ProductRelease.Channel.EAP)
393-
types = listOf(IntelliJPlatformType.IntellijIdeaCommunity)
392+
channels = listOf(ProductRelease.Channel.RELEASE, ProductRelease.Channel.EAP)
393+
types = listOf(IntelliJPlatformType.IntellijIdeaCommunity, IntelliJPlatformType.IntellijIdeaUltimate, IntelliJPlatformType.AndroidStudio)
394394
untilBuild = provider { null }
395395

396396
doLast {
397397
productsReleases.get().max()
398+
println()
399+
println("Mapping printProductsReleases output to ideV:")
400+
println(" - The prefix (e.g., IU-, IC-, AI-) maps to -Pide (Ultimate, IntelliJ, Android Studio).")
401+
println(" - The number part (e.g., 261.23567.71) maps to -PideV.")
402+
println(" - Example: IU-261.23567.71 -> -Pide=Ultimate -PideV=261.23567.71")
403+
println(" - Example: AI-2025.3.3.6 -> -Pide=AndroidStudio -PideV=2025.3.3.6")
404+
405+
println()
398406
}
399407
}
400408
prepareJarSearchableOptions {
@@ -415,6 +423,53 @@ tasks {
415423
}
416424
}
417425

426+
intellijPlatformTesting {
427+
runIde {
428+
register("runTarget") {
429+
val target = project.findProperty("ide") as? String
430+
val version = project.findProperty("ideV") as? String
431+
432+
val actualTarget = target ?: "AndroidStudio"
433+
type = when (actualTarget) {
434+
"IntelliJ" -> IntelliJPlatformType.IntellijIdeaCommunity
435+
"Ultimate" -> IntelliJPlatformType.IntellijIdeaUltimate
436+
else -> IntelliJPlatformType.AndroidStudio
437+
}
438+
this.version = version ?: ideaVersion
439+
}
440+
}
441+
}
442+
443+
tasks.named("runTarget") {
444+
val target = project.findProperty("ide") as? String
445+
val version = project.findProperty("ideV") as? String
446+
447+
doFirst {
448+
if (target == null && version == null) {
449+
println("============================================================")
450+
println("runTarget - Available Options")
451+
println("============================================================")
452+
println("Valid values for -Pide:")
453+
println(" - AndroidStudio (default)")
454+
println(" - IntelliJ (IntelliJ IDEA Community)")
455+
println(" - Ultimate (IntelliJ IDEA Ultimate)")
456+
println()
457+
println("Valid values for -PideV:")
458+
println(" - Any valid version string for the selected IDE.")
459+
println(" - Examples for IntelliJ/Ultimate: 2024.1, 2024.2, 2024.3, 2025.1")
460+
println(" - Run './gradlew printProductsReleases' to see the full list.")
461+
println()
462+
println("Examples:")
463+
println(" ./gradlew runTarget -Pide=IntelliJ -PideV=2025.1")
464+
println(" ./gradlew runTarget -Pide=Ultimate -PideV=2025.1")
465+
println("============================================================")
466+
println("Stopping execution. Please run with parameters to launch a specific IDE.")
467+
468+
throw org.gradle.api.tasks.StopExecutionException()
469+
}
470+
}
471+
}
472+
418473
// A task to print the classpath used for compiling an IntelliJ plugin
419474
// Run with `./gradlew printCompileClasspath --no-configuration-cache `
420475
tasks.register<Task>("printCompileClasspath") {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66

77
ideaVersion=2025.2.3.9
8-
dartPluginVersion= 503.0.0
8+
dartPluginVersion= 504.0.0
99
# Also update the versions for verify checks in tool/github.sh.
1010
sinceBuild=251
1111
untilBuild=261.*

0 commit comments

Comments
 (0)