Skip to content

Commit 9795732

Browse files
authored
Update docs with build changes (#8424)
1 parent 5a981ed commit 9795732

File tree

4 files changed

+19
-93
lines changed

4 files changed

+19
-93
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -117,22 +117,6 @@ name and contact info to the [AUTHORS](AUTHORS) file.
117117
- [IntelliJ Downloads](https://www.jetbrains.com/idea/download/)
118118
- Either the community edition (free) or Ultimate will work.
119119
120-
2. Create a `gradle.properties` file.
121-
- In the root directory, create an empty `gradle.properties` file (`touch gradle.properties`)
122-
- Add the following to the file:
123-
```
124-
flutterPluginVersion=SNAPSHOT
125-
ideaVersion=2024.3.1.7
126-
dartPluginVersion= 243.21565.120
127-
sinceBuild=243
128-
untilBuild=253.*
129-
javaVersion=21
130-
kotlin.stdlib.default.dependency=false
131-
org.gradle.parallel=true
132-
org.gradle.jvmargs=-Xms1024m -Xmx4048m
133-
```
134-
- **[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.
135-
136120
3. Start IntelliJ IDEA with the `flutter-intellij` project.
137121
- If you see a popup with "Gradle build scripts found",
138122
**confirm loading the Gradle project, and wait until syncing is done.**
@@ -188,13 +172,14 @@ name and contact info to the [AUTHORS](AUTHORS) file.
188172
189173
5. Configure the modules for the Project
190174
- Select "Project Settings > Modules"
191-
- Select the `flutter-intellij > flutter-idea` module
175+
- Select the `flutter-intellij` module
192176
- Switch to the "Paths" window
193177
- Select the **Inherit project compile output path** option, then apply.
178+
- Do the same for the subdirectories, `main` and `test`.
194179
195180
6. Change the modules SDK to the Project SDK
196181
- Select "Project Settings > Modules"
197-
- Select all the sub-directories under the `flutter-intellij > flutter-idea` module
182+
- Select all the subdirectories under the `flutter-intellij` module
198183
- Switch to the "Dependencies" window
199184
- Change the "Module SDK" selection to `Project SDK`.
200185
@@ -297,7 +282,7 @@ To be able to debug a single test class or test method, you need to do the follo
297282
The test configuration can be tricky due to the IntelliJ platform versioning.
298283
The plugin tool (below) can be a more reliable way to run tests.
299284
300-
### Using the plugin tool on the command line
285+
### Using the command line
301286
302287
To run unit tests on the command line:
303288
@@ -322,31 +307,6 @@ Sometimes browsing the source code of IntelliJ helps understand platform details
322307
Accept all the root folders found by the IDE after scanning.
323308
- Do the same for the `intellij-plugins` repo to get Dart plugin sources. Sync to the same version as before.
324309
325-
## Working with Android Studio
326-
327-
Android Studio cannot use the Gradle-based project definition,
328-
so it still needs the `flutter-intellij-community.iml` file.
329-
Obviously, unit tests can only be run from the command line.
330-
331-
1. Initialize Android Studio sources.
332-
2. Checkout Flutter plugin sources, tip of the tree.
333-
3. Follow the directions for setting up the Dart plugin sources in
334-
`intellij-plugins/Dart/README.md` with these changes:
335-
- you do not need to clone the intellij-community repo
336-
- open studio-main/tools/adt/idea in IntelliJ
337-
- possibly skip running `intellij-community/getPlugins.sh`
338-
4. Checkout Dart plugin sources.
339-
5. Using the Project Structure editor, import
340-
- intellij-plugins/Dart/Dart-community.iml (if there are lots of errors, see step 7)
341-
- flutter-intellij/flutter-intellij-community.iml
342-
6. Using the Project Structure editor, expand the tree to show `intellij > android > adt > ui`.
343-
Select the `ui` module, then add a module dependency from it to `flutter-intellij-community`.
344-
Also, add a dependency on the Dart module unless using step 7.
345-
7. (Optional, when Dart sources are not usable.) Make sure the `flutter-intellij-community` module
346-
has a dependency on a library named `Dart`. It should be pre-defined, but if it is out of date,
347-
then adjust it to point to `flutter-intellij/third_party/lib/dart-plugin/xxx.yyyy/Dart.jar`.
348-
Delete the Dart module from the Project Structure modules list.
349-
350310
## Flutter DevTools Integration
351311
352312
### Working with Embedded DevTools (JxBrowser)

docs/Releasing.md

Lines changed: 12 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,14 @@
11
# Creating a new release
22

3-
## From IntelliJ:
4-
- ensure that the changelog in `CHANGELOG.md` is up-to-date (from the current milestone)
5-
- edit `CHANGELOG.md` to update the release notes
6-
- re-generate the plugin.xml files using `bin/plugin generate`
7-
- commit these changes
8-
- create a new branch locally from that commit (`git checkout -B release_<version> SHA`, replacing `<version>` and `SHA` as appropriate)
9-
- in a terminal emulator, `bin/plugin --release=<version> build`, again replacing `<version>` with the current version number
10-
- the plugin is created as three separate `flutter-studio.zip` products in `/project/root/releases/release_<version>` (all three will be uploaded separately)
11-
- 2017.3
12-
- 2018.1
13-
- push your release branch upstream (`git push -u upstream release_21`)
14-
15-
## From plugins.jetbrains.com:
16-
- sign into https://plugins.jetbrains.com
17-
- from https://plugins.jetbrains.com/plugin/9212?pr=idea, select `'update plugin'`
18-
- upload the `flutter-studio.zip` files (one for each product) created from the earlier step (note: the `.zip` file)
19-
20-
# Pushing a patch to an existing release
21-
22-
When it's necessary to patch a previously released build:
23-
24-
## Change to the release branch
25-
26-
- the fix should have already been committed to master
27-
- `git pull` to get the latest branch information
28-
- change to the branch for that release (`git checkout release_21`)
29-
30-
## Cherry-pick the fix
31-
32-
- cherrypick the specific commit (`git cherry-pick 2d8ac6a`)
33-
- ensure that the changelog in `resources/META-INF/plugin.xml` is up-to-date (from the current milestone)
34-
- edit `CHANGELOG.md` to update the release notes
35-
- again, to re-generate the plugin.xml files use `bin/plugin generate`
36-
- commit these changes
37-
- push your release branch upstream (`git push -u upstream release_21`)
38-
39-
## Re-deploy the new Jar
40-
41-
- in a terminal emulator, `bin/plugin --release=<version> build`, again replacing `<version>` with the current version number
42-
- the plugin is created as three separate `flutter-studio.zip` products in `/project/root/releases/release_<version>` (all three will be uploaded separately)
43-
- 2017.3
44-
- 2018.1
45-
- 2018.2
46-
- sign into https://plugins.jetbrains.com
47-
- from https://plugins.jetbrains.com/plugin/9212?pr=idea, select `'update plugin'`
48-
- upload the `flutter-studio.zip` created from the earlier step (note: the `.zip` file)
3+
## Building the plugin zip file:
4+
- Make changes to the repository for the version.
5+
- Edit `CHANGELOG.md` to include the current milestone and associated release notes.
6+
- Increment the version for the dev release in `tool/kokoro/deploy.sh` (e.g. if the release about to go out is M90, the dev release version will be 91.0).
7+
- Commit these changes.
8+
- Update `gradle.properties` with the release number.
9+
- Run `./gradlew buildPlugin` - this will generate a `flutter-intellij.zip` file in `build/distributions`.
10+
11+
## Uploading the plugin:
12+
- Sign in to https://plugins.jetbrains.com.
13+
- From https://plugins.jetbrains.com/plugin/9212?pr=idea, select `'update plugin'`.
14+
- Upload the `flutter-intellij.zip` file created from the earlier step (note: the `.zip` file).

docs/building.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
Update the `gradle.properties` file
44

55
- IntelliJ IDEA versions can be found here: https://www.jetbrains.com/idea/download/other.html
6-
- Version numbers for the `product-matrix.json` should be taken from the name of the downloaded file, not versions listed on the
7-
website.
86
- Dart Plugin versions can be found here: https://plugins.jetbrains.com/plugin/6351-dart
97
- Android Studio versions can be found
108
here: https://developer.android.com/studio/archive & https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html
@@ -32,7 +30,7 @@ invited to the organization to upload plugin files.
3230
Building for releases was formerly done by the `plugin` tool when we wanted to run a script to generate multiple release versions at once.
3331
See [tool/plugin/README.md](../tool/plugin/README.md) for details.
3432

35-
The `plugin` tool is being retained currently for the dev build, linting, and verifying the plugin.
33+
The `plugin` tool is being retained currently for deploying the dev build, linting, and generating live templates.
3634

3735
### install gs_util
3836

resources/liveTemplates/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ To re-generate the flutter_miscellaneous.xml template file, run:
2121
```
2222
./bin/plugin generate
2323
```
24+
25+
Commit these at the time of making changes to live templates.

0 commit comments

Comments
 (0)