Skip to content

Commit f162f7d

Browse files
authored
Set versioning based on CHANGELOG (#8456)
There are several things happening here: - Use semver format for CHANGELOG - this makes it easier to use the gradle changelog plugin, so we don't have to define a custom regex for our versioning. - Set release version from CHANGELOG - as long as we update the changelog as part of the release process, we won't have to separately set the version in `gradle.properties`. The two should match during a release anyway. - Set dev version from CHANGELOG - this means we won't need to update a hard coded version in the deploy script. (will rebase after #8455) Addresses #8417
1 parent 6f6d8bf commit f162f7d

File tree

8 files changed

+129
-135
lines changed

8 files changed

+129
-135
lines changed

CHANGELOG-old.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,108 @@
1+
## 86
2+
3+
- New message in DevTools windows for "Dock unpinned" IntelliJ feature (#8181)
4+
- Fixes for Slow Operation notifications in the IDEA platform (#7792)
5+
- Fix in Flutter project creation flow (#8259)
6+
- Many code health improvements and code cleanups (#8025, #8027, #8021)
7+
- Migration of deprecated API usages (#7718)
8+
- Fix for empty menu item in the device selector (#8264)
9+
10+
## 85.3
11+
12+
- Add Property Editor side panel (#7957)
13+
- Support removed for IDEA 2024.1 (Koala) and 2024.2 (Ladybug) (#8073)
14+
- Various cleanups including migrating slow operations to non-blocking calls (#8089)
15+
16+
## 85.2
17+
18+
- Fix broken devtools inspector source navigation (#8041)
19+
20+
## 85.1
21+
22+
- Fix the disappearance of the New Flutter Project menu item (#8040)
23+
- Add back the device name with the running tab (#7948)
24+
- Update the `org.jetbrains.intellij.platform` version to `2.5.0` (#8038)
25+
- Replace deprecated ComboBoxWithBrowserButton (#7931)
26+
- Fix Flutter Outline View event over-subscriptions (#7980)
27+
28+
## 85
29+
30+
- Restored Test with coverage run configuration feature (#7810)
31+
- Upgrade `org.jetbrains.intellij.platform` to 2.2.1 from 2.1.0 (#7936)
32+
- Fix for DevTool windows not appearing (#8029)
33+
- Support for Narwhal, Android Studio 2025.1 (#7963)
34+
- Build changes to support newer required versions of Java to build the plugin (#7963)
35+
- Cleanup: removal of pre Dart SDK 3.0 code (#7882)
36+
- Cleanup: removal of the deprecated Swing-based Inspector window (#7861)
37+
- Cleanup: removal of the deprecated Outline window (#7816)
38+
- Cleanup: removal of the deprecated Performance page window (#7816)
39+
- Migrated all instances of EditorNotifications.Provider to the new API (#7830)
40+
41+
## 84
42+
43+
- This version was not shipped due to issue #7968
44+
45+
## 83
46+
47+
- First version for Meerkat, Android Studio 2024.3 (#7799)
48+
- Message in the Flutter Outline window that the window is now deprecated (#7778)
49+
- Testing and cleanup now that the code is migrated to the new Gradle Plugin (#7670)
50+
51+
## 82.2
52+
53+
- Release of the plugin for 2024.3 (#7670)
54+
- Migration to IntelliJ Platform Gradle Plugin (2.x) (#7670)
55+
- The Flutter coverage runner support has been removed (#7670)
56+
57+
## 82.1
58+
59+
- Fix for Cannot invoke "com.intellij.openapi.wm.ToolWindow.setAvailable(boolean)" issue -- thanks to @parlough (#7691)
60+
- New SDK notification to notify of old Flutter SDK usage (#7763)
61+
- Progress on migrating off of old IDEA APIs (#7718)
62+
- Significant code cleanup
63+
64+
## 82
65+
66+
- Various DevTools integration improvements (#7626) (#7621)
67+
- Removal of the old Performance page, now replaced by DevTools (#7624)
68+
- Add an option to reload a DevTools window (#7617)
69+
- Fix to the developer build (#7625)
70+
71+
## 81.1
72+
73+
- Initial support 2024.2 & Android Studio Ladybug Canary 6 (#7595)
74+
75+
## 81
76+
77+
- New icons to match "New UI" features in IntelliJ and Android Studio (#6595)
78+
- Restore Flutter test icons in the editor gutter (#7505)
79+
- Fix widget tree highlighting in the editor (#7522)
80+
- Resolve "Exception: Cannot invoke "org..AnAction.getTemplatePresentation()" exception (#7488)
81+
- Resolve "Pubspec has been edited" editor notification is stuck (#7538)
82+
- Resolve Released EditorImpl held by lambda in FlutterReloadManager (#7507)
83+
- Configure the Project view for Flutter in AS, when creating a new Flutter project (#4470)
84+
- Migrate to Kotlin UI DSL Version 2 (#7310)
85+
86+
## 80
87+
88+
- Resolve debugger issue with the new Dart macro file uri format (#7449)
89+
- Hide deep links window when insufficient SDK version (#7478)
90+
- Fix exceptions out of FlutterSampleNotificationProvider (#5634)
91+
- Additional fixes for deprecation of `ActionUpdateThread.OLD_EDT` (#7330)
92+
- Exception from EditorPerfDecorations fixed (#7432)
93+
- Exception from FlutterColorProvider fixed (#7428)
94+
- Fix top toolbar for new UI (#7423)
95+
- Update JxBrowser to `v7.38.2` (#7413)
96+
- "Open Android Module in Android Studio" action removed (#7103)
97+
- Fix for deprecation of `ActionUpdateThread.OLD_EDT` (#7330)
98+
- Deprecation of `ServiceExtensions.setPubRootDirectories` (#7142)
99+
- Fix plugin not opening in Android Studio (#7305)
100+
- Deadlock involving `WorkspaceCache.getInstance()` (#7333)
101+
- Fix for `AlreadyDisposedException` from `DartVmServiceDebugProcess` (#7381)
102+
- Memory leak fix out of `DartVmServiceDebugProcess` (7380)
103+
- Memory leak fix in `FlutterSettings` and `JxBrowser` (#7377)
104+
- Delete actions specific to legacy inspector (#7416)
105+
1106
# 79
2107
- Support IntelliJ 2024.1 (#7269)
3108
- Check version before starting ToolEvent stream (#7317)

CHANGELOG.md

Lines changed: 2 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -8,121 +8,16 @@
88

99
- Resolved a "Slow operations are prohibited on EDT" exception on Flutter Project creation (#8446, #8447, #8448)
1010

11-
## 87.1
11+
## 87.1.0
1212

1313
- Register VM service with DTD (#8436)
1414
- Fix for ClassCastException: BadgeIcon on flutter runs (#8426)
1515
- Fix the FlutterDependencyInspection for the analyzer workspaces (#8428)
1616

17-
## 87
17+
## 87.0.0
1818

1919
- Fixes to Flutter test execution (#8233, #8325)
2020
- Make Android dependencies optional, allowing the plugin to be used in more Jetbrains products (Rider, etc) (#7949, #8375)
2121
- Internal: support for logging to a dedicated plugin log file (#8253)
2222
- Fixes to ensure the Property Editor loads on all project opens (#8268)
2323
- Fix the hang after opening a new project in Android Studio (#8390)
24-
25-
## 86
26-
27-
- New message in DevTools windows for "Dock unpinned" IntelliJ feature (#8181)
28-
- Fixes for Slow Operation notifications in the IDEA platform (#7792)
29-
- Fix in Flutter project creation flow (#8259)
30-
- Many code health improvements and code cleanups (#8025, #8027, #8021)
31-
- Migration of deprecated API usages (#7718)
32-
- Fix for empty menu item in the device selector (#8264)
33-
34-
## 85.3
35-
36-
- Add Property Editor side panel (#7957)
37-
- Support removed for IDEA 2024.1 (Koala) and 2024.2 (Ladybug) (#8073)
38-
- Various cleanups including migrating slow operations to non-blocking calls (#8089)
39-
40-
## 85.2
41-
42-
- Fix broken devtools inspector source navigation (#8041)
43-
44-
## 85.1
45-
46-
- Fix the disappearance of the New Flutter Project menu item (#8040)
47-
- Add back the device name with the running tab (#7948)
48-
- Update the `org.jetbrains.intellij.platform` version to `2.5.0` (#8038)
49-
- Replace deprecated ComboBoxWithBrowserButton (#7931)
50-
- Fix Flutter Outline View event over-subscriptions (#7980)
51-
52-
## 85
53-
54-
- Restored Test with coverage run configuration feature (#7810)
55-
- Upgrade `org.jetbrains.intellij.platform` to 2.2.1 from 2.1.0 (#7936)
56-
- Fix for DevTool windows not appearing (#8029)
57-
- Support for Narwhal, Android Studio 2025.1 (#7963)
58-
- Build changes to support newer required versions of Java to build the plugin (#7963)
59-
- Cleanup: removal of pre Dart SDK 3.0 code (#7882)
60-
- Cleanup: removal of the deprecated Swing-based Inspector window (#7861)
61-
- Cleanup: removal of the deprecated Outline window (#7816)
62-
- Cleanup: removal of the deprecated Performance page window (#7816)
63-
- Migrated all instances of EditorNotifications.Provider to the new API (#7830)
64-
65-
## 84
66-
67-
- This version was not shipped due to issue #7968
68-
69-
## 83
70-
71-
- First version for Meerkat, Android Studio 2024.3 (#7799)
72-
- Message in the Flutter Outline window that the window is now deprecated (#7778)
73-
- Testing and cleanup now that the code is migrated to the new Gradle Plugin (#7670)
74-
75-
## 82.2
76-
77-
- Release of the plugin for 2024.3 (#7670)
78-
- Migration to IntelliJ Platform Gradle Plugin (2.x) (#7670)
79-
- The Flutter coverage runner support has been removed (#7670)
80-
81-
## 82.1
82-
83-
- Fix for Cannot invoke "com.intellij.openapi.wm.ToolWindow.setAvailable(boolean)" issue -- thanks to @parlough (#7691)
84-
- New SDK notification to notify of old Flutter SDK usage (#7763)
85-
- Progress on migrating off of old IDEA APIs (#7718)
86-
- Significant code cleanup
87-
88-
## 82
89-
90-
- Various DevTools integration improvements (#7626) (#7621)
91-
- Removal of the old Performance page, now replaced by DevTools (#7624)
92-
- Add an option to reload a DevTools window (#7617)
93-
- Fix to the developer build (#7625)
94-
95-
## 81.1
96-
97-
- Initial support 2024.2 & Android Studio Ladybug Canary 6 (#7595)
98-
99-
## 81
100-
101-
- New icons to match "New UI" features in IntelliJ and Android Studio (#6595)
102-
- Restore Flutter test icons in the editor gutter (#7505)
103-
- Fix widget tree highlighting in the editor (#7522)
104-
- Resolve "Exception: Cannot invoke "org..AnAction.getTemplatePresentation()" exception (#7488)
105-
- Resolve "Pubspec has been edited" editor notification is stuck (#7538)
106-
- Resolve Released EditorImpl held by lambda in FlutterReloadManager (#7507)
107-
- Configure the Project view for Flutter in AS, when creating a new Flutter project (#4470)
108-
- Migrate to Kotlin UI DSL Version 2 (#7310)
109-
110-
## 80
111-
112-
- Resolve debugger issue with the new Dart macro file uri format (#7449)
113-
- Hide deep links window when insufficient SDK version (#7478)
114-
- Fix exceptions out of FlutterSampleNotificationProvider (#5634)
115-
- Additional fixes for deprecation of `ActionUpdateThread.OLD_EDT` (#7330)
116-
- Exception from EditorPerfDecorations fixed (#7432)
117-
- Exception from FlutterColorProvider fixed (#7428)
118-
- Fix top toolbar for new UI (#7423)
119-
- Update JxBrowser to `v7.38.2` (#7413)
120-
- "Open Android Module in Android Studio" action removed (#7103)
121-
- Fix for deprecation of `ActionUpdateThread.OLD_EDT` (#7330)
122-
- Deprecation of `ServiceExtensions.setPubRootDirectories` (#7142)
123-
- Fix plugin not opening in Android Studio (#7305)
124-
- Deadlock involving `WorkspaceCache.getInstance()` (#7333)
125-
- Fix for `AlreadyDisposedException` from `DartVmServiceDebugProcess` (#7381)
126-
- Memory leak fix out of `DartVmServiceDebugProcess` (7380)
127-
- Memory leak fix in `FlutterSettings` and `JxBrowser` (#7377)
128-
- Delete actions specific to legacy inspector (#7416)

build.gradle.kts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,23 @@ plugins {
4343
id("org.jetbrains.changelog") version "2.2.0" // Gradle Changelog Plugin
4444
}
4545

46-
var flutterPluginVersion = providers.gradleProperty("flutterPluginVersion").get()
47-
if (project.hasProperty("dev-version")) {
46+
// By default (e.g. when we call `runIde` during development), the plugin version is SNAPSHOT
47+
var flutterPluginVersion = "SNAPSHOT"
48+
49+
// Otherwise, we will decide on the proper semver-formatted version from the CHANGELOG.
50+
// Note: The CHANGELOG follows the style from https://keepachangelog.com/en/1.0.0/ so that we can use the gradle changelog plugin.
51+
if (project.hasProperty("release")) {
52+
// If we are building for a release, the changelog should be updated with the latest version.
53+
flutterPluginVersion = changelog.getLatest().version
54+
} else if (project.hasProperty("dev")) {
55+
// If we are building the dev version, the version label will increment the latest version from the changelog and append the date.
56+
val latestVersion = changelog.getLatest().version
57+
val majorVersion = latestVersion.substringBefore('.').toInt()
58+
val nextMajorVersion = majorVersion + 1
4859
val datestamp = DateTimeFormatter.ofPattern("yyyyMMdd").format(LocalDate.now())
49-
flutterPluginVersion = project.property("dev-version").toString() + "-dev." + datestamp
60+
flutterPluginVersion = "$nextMajorVersion.0.0-dev.$datestamp"
5061
}
62+
5163
val ideaVersion = providers.gradleProperty("ideaVersion").get()
5264
val dartPluginVersion = providers.gradleProperty("dartPluginVersion").get()
5365
val sinceBuildInput = providers.gradleProperty("sinceBuild").get()
@@ -156,10 +168,6 @@ dependencies {
156168
)
157169
}
158170

159-
changelog {
160-
headerParserRegex = """(\d+(\.\d+)*)""".toRegex()
161-
}
162-
163171
intellijPlatform {
164172
pluginConfiguration {
165173
version = flutterPluginVersion

docs/Milestones.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
- any work done or issues fixed should be assigned to the current milestone
66
- at the end of the milestone, we run through the [testing plan](https://github.com/flutter/flutter-intellij/blob/master/docs/testing.md) and validate the candidate release
77
- before releasing, we update the [changelog](https://github.com/flutter/flutter-intellij/blob/master/resources/META-INF/plugin.xml#L22) (based on the work tracking in the milestone)
8-
- we then [ship](../docs/Releasing.md), and iterate
8+
- we then [build and release](../docs/building.md), and iterate

docs/Releasing.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/building.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ Update the `gradle.properties` file
88
here: https://developer.android.com/studio/archive & https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html
99
- To view the current sources from Android Studio, use https://cs.android.com/android-studio
1010

11+
Edit `CHANGELOG.md` to include the new version number and associated release notes.
12+
13+
Commit these changes.
14+
1115
Verify that the file `./resources/jxbrowser/jxbrowser.properties` has been copied from `./resources/jxbrowser/jxbrowser.properties.template`
1216
with the `<KEY>` replaced with a valid JXBrowser key to be used in the built Flutter plugin.
1317

1418
Run gradle:
1519

16-
- Make `flutterPluginVersion` in `gradle.properties` the release number, e.g. 87.0.1
1720
- Check that `$JAVA_HOME` is set (see CONTRIBUTING.md for instructions if not set)
18-
- Run `./gradlew buildPlugin` to build the plugin for the settings specified in `gradle.properties`
21+
- Run `./gradlew buildPlugin -Prelease` to build the plugin for the settings specified in `gradle.properties`
1922
- The output .zip file will be in `<flutter-intellij root>/build/distributions`
2023

2124
### Test and upload to the JetBrains Servers

gradle.properties

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
# found in the LICENSE file.
55
#
66

7-
# Change to version when releasing, e.g.
8-
#flutterPluginVersion=87.0.1
9-
flutterPluginVersion=SNAPSHOT
107
ideaVersion=2025.1.3.4
118
dartPluginVersion= 251.27623.5
129
sinceBuild=243

tool/kokoro/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ echo "kokoro test finished"
2020

2121
echo "kokoro build start"
2222

23-
./gradlew buildPlugin -Pdev-version=88.0
23+
./gradlew buildPlugin -Pdev
2424

2525
echo "kokoro build finished"
2626

0 commit comments

Comments
 (0)