Skip to content

Commit f0de2bd

Browse files
authored
Use gradle build file to populate changelog (#8360)
We're currently using `plugin.dart` to read the `CHANGELOG.md` file and write it to `plugin.xml`, but we can also use the `changeNotes` property from [IJ documentation](https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html#intellijPlatform-pluginConfiguration-changeNotes). Old way: - `plugin.dart` reads `plugin-template.xml` and `CHANGELOG.md` - `plugin.dart` combines the two and writes all the change notes to `plugin.xml` - `gradlew buildPlugin` is run New way: - `plugin.dart` doesn't touch the change log part - `gradlew buildPlugin` adds in changelog We can check that change log has been inserted in the final `flutter-intellij.zip` file: <img width="928" height="692" alt="Screenshot 2025-07-22 at 10 38 33 AM" src="https://github.com/user-attachments/assets/57ae65d7-5b28-4de8-9b2c-a3d63846f5c8" />
1 parent d4d2401 commit f0de2bd

File tree

4 files changed

+6
-118
lines changed

4 files changed

+6
-118
lines changed

build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ intellijPlatform {
155155
sinceBuild = sinceBuildInput
156156
untilBuild = untilBuildInput
157157
}
158+
changeNotes = provider {
159+
file("CHANGELOG.md").readText(Charsets.UTF_8)
160+
}
158161
}
159162

160163
// Verifier documentation

resources/META-INF/plugin.xml

Lines changed: 1 addition & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -50,115 +50,7 @@
5050
<depends optional="true" config-file="studio-contribs.xml">com.intellij.modules.androidstudio</depends>
5151

5252

53-
<change-notes>
54-
<![CDATA[
55-
<h1>86</h1>
56-
<ul>
57-
<li>New message in DevTools windows for &quot;Dock unpinned&quot; IntelliJ feature (#8181)</li>
58-
<li>Fixes for Slow Operation notifications in the IDEA platform (#7792)</li>
59-
<li>Fix in Flutter project creation flow (#8259)</li>
60-
<li>Many code health improvements and code cleanups (#8025, #8027, #8021)</li>
61-
<li>Migration of deprecated API usages (#7718)</li>
62-
<li>Fix for empty menu item in the device selector (#8264)</li>
63-
</ul>
64-
<h1>85.3</h1>
65-
<ul>
66-
<li>Add Property Editor side panel (#7957)</li>
67-
<li>Support removed for IDEA 2024.1 (Koala) and 2024.2 (Ladybug) (#8073)</li>
68-
<li>Various cleanups including migrating slow operations to non-blocking calls (#8089)</li>
69-
</ul>
70-
<h1>85.2</h1>
71-
<ul>
72-
<li>Fix broken devtools inspector source navigation (#8041)</li>
73-
</ul>
74-
<h1>85.1</h1>
75-
<ul>
76-
<li>Fix the disappearance of the New Flutter Project menu item (#8040)</li>
77-
<li>Add back the device name with the running tab (#7948)</li>
78-
<li>Update the <code>org.jetbrains.intellij.platform</code> version to <code>2.5.0</code> (#8038)</li>
79-
<li>Replace deprecated ComboBoxWithBrowserButton (#7931)</li>
80-
<li>Fix Flutter Outline View event over-subscriptions (#7980)</li>
81-
</ul>
82-
<h1>85</h1>
83-
<ul>
84-
<li>Restored Test with coverage run configuration feature (#7810)</li>
85-
<li>Upgrade <code>org.jetbrains.intellij.platform</code> to 2.2.1 from 2.1.0 (#7936)</li>
86-
<li>Fix for DevTool windows not appearing (#8029)</li>
87-
<li>Support for Narwhal, Android Studio 2025.1 (#7963)</li>
88-
<li>Build changes to support newer required versions of Java to build the plugin (#7963)</li>
89-
<li>Cleanup: removal of pre Dart SDK 3.0 code (#7882)</li>
90-
<li>Cleanup: removal of the deprecated Swing-based Inspector window (#7861)</li>
91-
<li>Cleanup: removal of the deprecated Outline window (#7816)</li>
92-
<li>Cleanup: removal of the deprecated Performance page window (#7816)</li>
93-
<li>Migrated all instances of EditorNotifications.Provider to the new API (#7830)</li>
94-
</ul>
95-
<h1>84</h1>
96-
<ul>
97-
<li>This version was not shipped due to issue #7968</li>
98-
</ul>
99-
<h1>83</h1>
100-
<ul>
101-
<li>First version for Meerkat, Android Studio 2024.3 (#7799)</li>
102-
<li>Message in the Flutter Outline window that the window is now deprecated (#7778)</li>
103-
<li>Testing and cleanup now that the code is migrated to the new Gradle Plugin (#7670)</li>
104-
</ul>
105-
<h1>82.2</h1>
106-
<ul>
107-
<li>Release of the plugin for 2024.3 (#7670)</li>
108-
<li>Migration to IntelliJ Platform Gradle Plugin (2.x) (#7670)</li>
109-
<li>The Flutter coverage runner support has been removed (#7670)</li>
110-
</ul>
111-
<h1>82.1</h1>
112-
<ul>
113-
<li>Fix for Cannot invoke &quot;com.intellij.openapi.wm.ToolWindow.setAvailable(boolean)&quot; issue -- thanks to @parlough (#7691)</li>
114-
<li>New SDK notification to notify of old Flutter SDK usage (#7763)</li>
115-
<li>Progress on migrating off of old IDEA APIs (#7718)</li>
116-
<li>Significant code cleanup</li>
117-
</ul>
118-
<h1>82</h1>
119-
<ul>
120-
<li>Various DevTools integration improvements (#7626) (#7621)</li>
121-
<li>Removal of the old Performance page, now replaced by DevTools (#7624)</li>
122-
<li>Add an option to reload a DevTools window (#7617)</li>
123-
<li>Fix to the developer build (#7625)</li>
124-
</ul>
125-
<h1>81.1</h1>
126-
<ul>
127-
<li>Initial support 2024.2 &amp; Android Studio Ladybug Canary 6 (#7595)</li>
128-
</ul>
129-
<h1>81</h1>
130-
<ul>
131-
<li>New icons to match &quot;New UI&quot; features in IntelliJ and Android Studio (#6595)</li>
132-
<li>Restore Flutter test icons in the editor gutter (#7505)</li>
133-
<li>Fix widget tree highlighting in the editor (#7522)</li>
134-
<li>Resolve &quot;Exception: Cannot invoke &quot;org..AnAction.getTemplatePresentation()&quot; exception (#7488)</li>
135-
<li>Resolve &quot;Pubspec has been edited&quot; editor notification is stuck (#7538)</li>
136-
<li>Resolve Released EditorImpl held by lambda in FlutterReloadManager (#7507)</li>
137-
<li>Configure the Project view for Flutter in AS, when creating a new Flutter project (#4470)</li>
138-
<li>Migrate to Kotlin UI DSL Version 2 (#7310)</li>
139-
</ul>
140-
<h1>80</h1>
141-
<ul>
142-
<li>Resolve debugger issue with the new Dart macro file uri format (#7449)</li>
143-
<li>Hide deep links window when insufficient SDK version (#7478)</li>
144-
<li>Fix exceptions out of FlutterSampleNotificationProvider (#5634)</li>
145-
<li>Additional fixes for deprecation of <code>ActionUpdateThread.OLD_EDT</code> (#7330)</li>
146-
<li>Exception from EditorPerfDecorations fixed (#7432)</li>
147-
<li>Exception from FlutterColorProvider fixed (#7428)</li>
148-
<li>Fix top toolbar for new UI (#7423)</li>
149-
<li>Update JxBrowser to <code>v7.38.2</code> (#7413)</li>
150-
<li>&quot;Open Android Module in Android Studio&quot; action removed (#7103)</li>
151-
<li>Fix for deprecation of <code>ActionUpdateThread.OLD_EDT</code> (#7330)</li>
152-
<li>Deprecation of <code>ServiceExtensions.setPubRootDirectories</code> (#7142)</li>
153-
<li>Fix plugin not opening in Android Studio (#7305)</li>
154-
<li>Deadlock involving <code>WorkspaceCache.getInstance()</code> (#7333)</li>
155-
<li>Fix for <code>AlreadyDisposedException</code> from <code>DartVmServiceDebugProcess</code> (#7381)</li>
156-
<li>Memory leak fix out of <code>DartVmServiceDebugProcess</code> (7380)</li>
157-
<li>Memory leak fix in <code>FlutterSettings</code> and <code>JxBrowser</code> (#7377)</li>
158-
<li>Delete actions specific to legacy inspector (#7416)</li>
159-
</ul>
160-
]]>
161-
</change-notes>
53+
<change-notes></change-notes>
16254

16355
<!-- Everything following should be SmallIDE-friendly.-->
16456
<!-- See: http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html -->

resources/META-INF/plugin_template.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--suppress PluginXmlI18n -->
22
<idea-plugin>
3-
<id>@PLUGINID@</id>
3+
<id>io.flutter</id>
44
<name>Flutter</name>
55
<description>
66
<![CDATA[
@@ -48,10 +48,7 @@
4848
<depends optional="true" config-file="studio-contribs.xml">@DEPEND@</depends>
4949

5050

51-
<change-notes>
52-
<![CDATA[
53-
@CHANGELOG@]]>
54-
</change-notes>
51+
<change-notes></change-notes>
5552

5653
<!-- Everything following should be SmallIDE-friendly.-->
5754
<!-- See: http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html -->

tool/plugin/lib/plugin.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,17 +239,13 @@ List<Map<String, Object?>> readProductMatrix() {
239239
String substituteTemplateVariables(String line, BuildSpec spec) {
240240
String valueOf(String name) {
241241
switch (name) {
242-
case 'PLUGINID':
243-
return spec.pluginId;
244242
case 'SINCE':
245243
return spec.sinceBuild;
246244
case 'UNTIL':
247245
return spec.untilBuild;
248246
case 'VERSION':
249247
var releaseNo = buildVersionNumber(spec);
250248
return '<version>$releaseNo</version>';
251-
case 'CHANGELOG':
252-
return spec.changeLog;
253249
case 'DEPEND':
254250
// If found, this is the module that triggers loading the Android Studio
255251
// support. The public sources and the installable plugin use different ones.

0 commit comments

Comments
 (0)