Skip to content

Commit e03dfc6

Browse files
authored
Merge branch 'flutter:master' into feat/optional-android-dep
2 parents 7ff257b + c3076b4 commit e03dfc6

File tree

104 files changed

+1087
-3071
lines changed

Some content is hidden

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

104 files changed

+1087
-3071
lines changed

.github/workflows/presubmit.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
version: [2023.3, 2024.1, 2024.2, 2024.3]
24+
version: [2024.1, 2024.2, 2024.3, 2025.1]
2525
steps:
2626
- name: checkout
2727
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

.idea/inspectionProfiles/Project_Default.xml

+11-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
# 84
2-
- Fix the slow operation notification associated with PubRoot (#7885)
1+
# 85
2+
- Restored Test with coverage run configuration feature (#7810)
3+
- Upgrade `org.jetbrains.intellij.platform` to 2.2.1 from 2.1.0 (#7936)
4+
- Fix for DevTool windows not appearing (#8029)
5+
- Support for Narwhal, Android Studio 2025.1 (#7963)
6+
- Build changes to support newer required versions of Java to build the plugin (#7963)
37
- Cleanup: removal of pre Dart SDK 3.0 code (#7882)
48
- Cleanup: removal of the deprecated Swing-based Inspector window (#7861)
59
- Cleanup: removal of the deprecated Outline window (#7816)
610
- Cleanup: removal of the deprecated Performance page window (#7816)
711
- Migrated all instances of EditorNotifications.Provider to the new API (#7830)
812

13+
# 84
14+
- This version was not shipped due to issue #7968
15+
916
# 83
1017
- First version for Meerkat, Android Studio 2024.3 (#7799)
1118
- Message in the Flutter Outline window that the window is now deprecated (#7778)

CONTRIBUTING.md

+19-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Contributing to Flutter Plugin for IntelliJ
1414
* [Adding platform sources](#adding-platform-sources)
1515
* [Working with Android Studio](#working-with-android-studio)
1616
* [Working with Embedded DevTools (JxBrowser)](#working-with-embedded-devtools-jxbrowser)
17-
* [Signing commits](#signing-commits)
1817
<!-- TOC -->
1918

2019
## Contributing code
@@ -116,7 +115,7 @@ name and contact info to the [AUTHORS](AUTHORS) file.
116115
- In the root directory, create an empty `gradle.properties` file (`touch gradle.properties`)
117116
- Add the following to the file:
118117
```
119-
name = "flutter-intellij
118+
name = "flutter-intellij"
120119
buildSpec=2024.3
121120
flutterPluginVersion=1
122121
ideaProduct=android-studio
@@ -129,7 +128,7 @@ name and contact info to the [AUTHORS](AUTHORS) file.
129128
testing=true
130129
kotlin.stdlib.default.dependency=false
131130
org.gradle.parallel=true
132-
org.gradle.jvmargs=-Xms1024m -Xmx4048m`
131+
org.gradle.jvmargs=-Xms1024m -Xmx4048m
133132
```
134133
- **[Note]** If you want, you can manually change these properties to target different versions of IntelliJ. See `product-matrix.json` to find which configurations are supported.
135134
@@ -380,7 +379,9 @@ Obviously, unit tests can only be run from the command line.
380379
then adjust it to point to `flutter-intellij/third_party/lib/dart-plugin/xxx.yyyy/Dart.jar`.
381380
Delete the Dart module from the Project Structure modules list.
382381
383-
## Working with Embedded DevTools (JxBrowser)
382+
## Flutter DevTools Integration
383+
384+
### Working with Embedded DevTools (JxBrowser)
384385
385386
We use [JxBrowser](https://www.teamdev.com/jxbrowser),
386387
a commercial product, to embed DevTools within IntelliJ.
@@ -399,3 +400,17 @@ To set up the license key:
399400
1. Copy the template at resources/jxbrowser/jxbrowser.properties.template
400401
and save it as resources/jxbrowser/jxbrowser.properties.
401402
2. Replace `<KEY>` with the actual key.
403+
404+
### Developing with local DevTools
405+
406+
By default, the DevTools version in IntelliJ will match the DevTools version shipped with Flutter. To instead use a local DevTools version (which will be launched with `dt serve`), the following steps are required:
407+
408+
1. Make sure you have `dt` installed
409+
- Follow instructions in the [DevTools set-up guide](https://github.com/flutter/devtools/blob/master/CONTRIBUTING.md#set-up-your-devtools-environment)
410+
2. Set the registry key to your DevTools directory
411+
- Go to Help > Find action > Registry > Find "flutter.local.devtools.dir" and set to your DevTools directory. (e.g. Users/user/dev/devtools)
412+
- Optional: If you want to pass additional arguments to `dt serve`, put these in the option "flutter.local.devtools.args"
413+
3. Restart IntelliJ
414+
4. Open Help > Show log in finder > Open idea.log
415+
- Verify you see output like see output `"DevTools startup: <various messages that come from running dt serve>"`
416+
5. To stop using local DevTools, go back to the registry key set in step 2 and remove it

build.gradle.kts

+34-67
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ plugins {
3232
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html
3333
// https://github.com/JetBrains/intellij-platform-gradle-plugin/releases
3434
// https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm
35-
// TODO(jwren) "2.2.0" can't be used to build 2023.3, as soon as we don't support this version, update the version here and elsewhere:
36-
id("org.jetbrains.intellij.platform") version "2.1.0"
37-
id("org.jetbrains.kotlin.jvm") version "2.1.0"
35+
id("org.jetbrains.intellij.platform") version "2.5.0"
36+
id("org.jetbrains.kotlin.jvm") version "2.1.20"
3837
}
3938

39+
// TODO(mossmana) These properties are duplicated in flutter-idea/build.gradle.kts and flutter-studio/build.gradle.kts. Should be consolidated.
4040
val flutterPluginVersion = providers.gradleProperty("flutterPluginVersion").get()
4141
val ideaProduct = providers.gradleProperty("ideaProduct").get()
4242
val ideaVersion = providers.gradleProperty("ideaVersion").get()
@@ -45,6 +45,7 @@ val dartPluginVersion = providers.gradleProperty("dartPluginVersion").get()
4545
val androidPluginVersion = providers.gradleProperty("androidPluginVersion").get()
4646
val sinceBuildInput = providers.gradleProperty("sinceBuild").get()
4747
val untilBuildInput = providers.gradleProperty("untilBuild").get()
48+
val javaVersion = providers.gradleProperty("javaVersion").get()
4849
group = "io.flutter"
4950

5051
// For debugging purposes:
@@ -55,32 +56,49 @@ println("dartPluginVersion: $dartPluginVersion")
5556
println("androidPluginVersion: $androidPluginVersion")
5657
println("sinceBuild: $sinceBuildInput")
5758
println("untilBuild: $untilBuildInput")
59+
println("javaVersion: $javaVersion")
5860
println("group: $group")
5961

62+
var jvmVersion: JvmTarget
63+
if (javaVersion == "17") {
64+
jvmVersion = JvmTarget.JVM_17
65+
} else if (javaVersion == "21") {
66+
jvmVersion = JvmTarget.JVM_21
67+
} else {
68+
throw IllegalArgumentException("javaVersion must be defined in the product matrix as either \"17\" or \"21\", but is not for $ideaVersion")
69+
}
6070
kotlin {
6171
compilerOptions {
6272
apiVersion.set(KotlinVersion.KOTLIN_1_9)
63-
jvmTarget = JvmTarget.JVM_17
73+
jvmTarget = jvmVersion
6474
}
6575
}
66-
val javaCompatibilityVersion = JavaVersion.VERSION_17
76+
77+
var javaCompatibilityVersion: JavaVersion
78+
if (javaVersion == "17") {
79+
javaCompatibilityVersion = JavaVersion.VERSION_17
80+
} else if (javaVersion == "21") {
81+
javaCompatibilityVersion = JavaVersion.VERSION_21
82+
} else {
83+
throw IllegalArgumentException("javaVersion must be defined in the product matrix as either \"17\" or \"21\", but is not for $ideaVersion")
84+
}
6785
java {
6886
sourceCompatibility = javaCompatibilityVersion
6987
targetCompatibility = javaCompatibilityVersion
7088
}
7189

7290
dependencies {
7391
intellijPlatform {
74-
// Documentation on the create(...) methods:
75-
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#custom-target-platforms
92+
// Documentation on the default target platform methods:
93+
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#default-target-platforms
7694
if (ideaProduct == "android-studio") {
77-
create(IntelliJPlatformType.AndroidStudio, ideaVersion)
78-
} else {//if (ide == "ideaIC") {
79-
create(IntelliJPlatformType.IntellijIdeaCommunity, ideaVersion)
95+
androidStudio(ideaVersion)
96+
} else { // if (ideaProduct == "IC") {
97+
intellijIdeaCommunity(ideaVersion)
8098
}
8199
testFramework(TestFrameworkType.Platform)
82100

83-
// Plugin dependnecy documentation:
101+
// Plugin dependency documentation:
84102
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#plugins
85103
val bundledPluginList = mutableListOf(
86104
"com.intellij.java",
@@ -89,8 +107,7 @@ dependencies {
89107
"Git4Idea",
90108
"org.jetbrains.kotlin",
91109
"org.jetbrains.plugins.gradle",
92-
"org.intellij.intelliLang",
93-
)
110+
"org.intellij.intelliLang")
94111
if (ideaProduct == "android-studio") {
95112
bundledPluginList.add("org.jetbrains.android")
96113
bundledPluginList.add("com.android.tools.idea.smali")
@@ -105,12 +122,10 @@ dependencies {
105122
bundledPlugins(bundledPluginList)
106123
plugins(pluginList)
107124

108-
// The warning that "instrumentationTools()" is deprecated might be valid, however, this error is produced by Gradle IJ plugin version
109-
// 2.1.0 if this isn't included:
110-
// Caused by: org.gradle.api.GradleException: No Java Compiler dependency found.
111-
// Please ensure the `instrumentationTools()` entry is present in the project dependencies section along with the `intellijDependencies()` entry in the repositories section.
112-
// See: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
113-
instrumentationTools()
125+
if (sinceBuildInput == "243" || sinceBuildInput == "251") {
126+
bundledModule("intellij.platform.coverage")
127+
bundledModule("intellij.platform.coverage.agent")
128+
}
114129
pluginVerifier()
115130
}
116131
}
@@ -123,54 +138,6 @@ intellijPlatform {
123138
untilBuild = untilBuildInput
124139
}
125140
}
126-
127-
// Verifier documentation
128-
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html#intellijPlatform-pluginVerification
129-
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html#intellijPlatform-pluginVerification-ides
130-
pluginVerification {
131-
// https://github.com/JetBrains/intellij-plugin-verifier/?tab=readme-ov-file#specific-options
132-
// https://github.com/JetBrains/intellij-plugin-verifier
133-
cliPath = file("../third_party/lib/verifier-cli-1.381-all.jar")
134-
failureLevel = listOf(
135-
// TODO(team) Ideally all of the following FailureLevels should be enabled:
136-
// TODO(team) Create a tracking issue for each of the following validations
137-
// VerifyPluginTask.FailureLevel.COMPATIBILITY_WARNINGS,
138-
// VerifyPluginTask.FailureLevel.COMPATIBILITY_PROBLEMS,
139-
// VerifyPluginTask.FailureLevel.DEPRECATED_API_USAGES,
140-
// VerifyPluginTask.FailureLevel.SCHEDULED_FOR_REMOVAL_API_USAGES,
141-
VerifyPluginTask.FailureLevel.EXPERIMENTAL_API_USAGES,
142-
// VerifyPluginTask.FailureLevel.INTERNAL_API_USAGES,
143-
// VerifyPluginTask.FailureLevel.OVERRIDE_ONLY_API_USAGES,
144-
VerifyPluginTask.FailureLevel.NON_EXTENDABLE_API_USAGES,
145-
VerifyPluginTask.FailureLevel.PLUGIN_STRUCTURE_WARNINGS,
146-
// VerifyPluginTask.FailureLevel.MISSING_DEPENDENCIES,
147-
VerifyPluginTask.FailureLevel.INVALID_PLUGIN,
148-
// VerifyPluginTask.FailureLevel.NOT_DYNAMIC,
149-
)
150-
verificationReportsFormats = VerifyPluginTask.VerificationReportsFormats.ALL
151-
subsystemsToCheck = VerifyPluginTask.Subsystems.ALL
152-
// Mute and freeArgs documentation
153-
// https://github.com/JetBrains/intellij-plugin-verifier/?tab=readme-ov-file#specific-options
154-
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-faq.html#mutePluginVerifierProblems
155-
freeArgs = listOf(
156-
"-mute",
157-
"TemplateWordInPluginId,ForbiddenPluginIdPrefix,TemplateWordInPluginName"
158-
)
159-
ides {
160-
if (ideaProduct == "android-studio") {
161-
ide(IntelliJPlatformType.AndroidStudio, ideaVersion)
162-
} else {
163-
ide(IntelliJPlatformType.IntellijIdeaCommunity, ideaVersion)
164-
}
165-
// recommended()
166-
// select {
167-
// types = listOf(IntelliJPlatformType.AndroidStudio)
168-
// channels = listOf(ProductRelease.Channel.RELEASE)
169-
// sinceBuild = sinceBuildInput
170-
// untilBuild = untilBuildInput
171-
// }
172-
}
173-
}
174141
}
175142

176143
// Documentation for printProductsReleases:

docs/building.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Update the [product-matrix.json](../product-matrix.json):
88
- IntelliJ IDEA versions can be found here: https://www.jetbrains.com/idea/download/other.html
99
- Version numbers for the `product-matrix.json` should be taken from the name of the downloaded file, not versions listed on the website.
1010
- Dart Plugin versions can be found here: https://plugins.jetbrains.com/plugin/6351-dart
11-
- Android Studio versions can be found here: https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html
11+
- Android Studio versions can be found here: https://developer.android.com/studio/archive & https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html
1212
- To view the current sources from Android Studio, use https://cs.android.com/android-studio
1313
- To get versions of the Android plugin for IntelliJ, versions can be pulled from https://plugins.jetbrains.com/plugin/22989-android
1414

flutter-gui-tests/README.md

-46
This file was deleted.

0 commit comments

Comments
 (0)