You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. Set your `FLUTTER_SDK` path in the configuration file for your shell environment.
78
+
- For example, on macOS, the following works:
79
+
Check where your Flutter SDK is installed:
80
+
```shell
81
+
which flutter
82
+
```
83
+
This should print out a path to the Flutter SDK such as:
84
+
```shell
85
+
home/path/to/flutter/bin/flutter
86
+
```
87
+
In your shell configuration file (e.g. `.bashrc` or `.zshrc`), set your `FLUTTER_SDK` env variable to match the path.
88
+
```shell
89
+
export FLUTTER_SDK="$HOME/path/to/flutter"
90
+
```
91
+
92
+
4. Set your `DARK_SDK` path in the configuration file for your shell environment.
93
+
- In your shell configuration file (e.g. `.bashrc` or `.zshrc`), set your `DART_SDK` env variable to match the Dart SDK in your Flutter SDK. This should look like the `FLUTTER_SDK` path (added above) with `/bin/cache/dart-sdk` appened to the end.
5. Add `DART_SDK`, `FLUTTER_SDK` and `JAVA_HOME` to your `PATH`.
99
+
- In your shell configuration file (e.g. `.bashrc` or `.zshrc`), below where your `JAVA_HOME`, `FLUTTER_SDK`, `DART_SDK` env variables were set, add the following line:
* `X:\path\to\your\IDEA-U\ch-0\231.8109.175` (Windows after installed)
85
-
6. Start the IntelliJ IDEA with the `flutter-intellij` project.
113
+
114
+
2. Create a `gradle.properties` file.
115
+
- In the root directory, create an empty `gradle.properties` file (`touch gradle.properties`)
116
+
- Add the following to the file:
117
+
```
118
+
name = "flutter-intellij
119
+
buildSpec=2024.3
120
+
flutterPluginVersion=1
121
+
ideaProduct=android-studio
122
+
ideaVersion=2024.3.1.7
123
+
baseVersion=243.22562.59
124
+
dartPluginVersion= 243.21565.120
125
+
androidPluginVersion=
126
+
sinceBuild=243
127
+
untilBuild=253.*
128
+
testing=true
129
+
kotlin.stdlib.default.dependency=false
130
+
org.gradle.parallel=true
131
+
org.gradle.jvmargs=-Xms1024m -Xmx4048m`
132
+
```
133
+
- **[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.
134
+
135
+
3. Start the IntelliJ IDEA with the `flutter-intellij` project.
86
136
- If you see a popup with "Gradle build scripts found",
87
137
**confirm loading the Gradle project, and wait until syncing is done.**
88
138
- If you didn't see the popup at the first start, **delete & re-clone the repo** and try again.
89
139
- Install DevKit plugin when prompted (this is required for later steps)
90
140
- Ignore suggestion for `protobuf-java` plugin, unless you want it.
91
-
7. Prepare other dependencies from the command line:
141
+
142
+
4. Prepare other dependencies from the command line:
92
143
- `cd path/to/flutter-intellij`
93
144
- `dart pub get`
94
145
- `(cd tool/plugin; dart pub get)`
95
146
- `bin/plugin test`
96
-
8. In the "Project Structure" dialog (`File | Project Structure`):
97
-
- Select "Platform Settings > SDKs", click the "+" sign at the top "Add New SDK (Alt+Insert)",
98
-
thenselect"Add JDK...".
99
-
- Point it to the directory of the jbr which is under the IDEA's content (e.g. `IntelliJ IDEA CE.app/Contents/jbr`).
100
-
- Change the name to `IDEA JBR 17` (or any names that your can easily identify).
101
-
- Select "Platform Settings > SDKs", click the "+" sign at the top "Add New SDK (Alt+Insert)",
102
-
then select "Add IntelliJ Platform Plugin SDK...".
103
-
- If you don't see this option, ensure you have the DevKit plugin installed.
104
-
- Point it to the directory of the content which is under the IDEA's installation.
105
-
- Remember the generated name (probably `IntelliJ IDEA IU-231.8109.175`) or change to name to format like this.
106
-
- Change the "Internal Java Platform" to the previous `IDEA JBR 17`.
107
-
- Select "Platform Settings > Project", change the "SDK" selection to **the previous IntelliJ Platform Plugin SDK**
108
-
(probably `IntelliJ IDEA IU-231.8109.175 java version 17`).
109
-
- Select "Platform Settings > Modules".
110
-
- Select "flutter-intellij > flutter-idea > main" module, switch to the "Paths" window,
111
-
select the **Inherit project compile output path** option then apply.
112
-
This step can be repeated after everytime the project is open.
113
-
- Select every module from the top (flutter-intellij) to the bottom (test) (could be 6 modules in summary),
114
-
switch to the "Dependencies" window, change the "Module SDK" selection to `Project SDK`.
115
-
9. In the "File | Settings | Build, Execution, Deployment | Build Tools | Gradle" setting:
147
+
148
+
### Configure "Project Structure" settings
149
+
150
+
1. From IntelliJ, Open the "Project Structure" dialog (`File | Project Structure`).
151
+
152
+
2. Add the IntelliJ JBR from disk:
153
+
- Select "Platform Settings > SDKs"
154
+
- Click the "+" sign at the top "Add New SDK (Alt+Insert)", then select "Add JDK from disk...".
155
+
- Select your IntelliJ application (most likely under `Applications`) and from there, select the `Contents/jbr/Contents/Home` directory
156
+
- **[For macos]** You won't be able to select the `Contents` directory from Finder without right-clicking on the IntelliJ application, and selecting "Quick Look" from the dropdown that opens. From there, you can select the `Contents` directory.
157
+
- Change the name so that you can easily identify it, e.g. `IDEA JBR 21`.
158
+
- When you are done, your settings should look something like:
159
+
```
160
+
Name: IDEA JBR 21
161
+
JDK home path: /Applications/IntelliJ IDEA CE.app/Contents/jbr/Contents/Home
162
+
```
163
+
164
+
3. Add the IntelliJ Platform Plugin SDK
165
+
- Select "Platform Settings > SDKs"
166
+
- Click the "+" sign at the top "Add New SDK (Alt+Insert)", then select "Add IntelliJ Platform Plugin SDK...".
167
+
- **[Note]** If you don't see this option, ensure you have the DevKit plugin installed.
168
+
- Select your IntelliJ application (most likely under `Applications`) and from there, select the `Contents` directory
169
+
- **[For macos]** You won't be able to select the `Contents` directory from Finder without right-clicking on the IntelliJ application, and selecting "Quick Look" from the dropdown that opens.
170
+
- Remember the generated name (probably `IntelliJ IDEA IU-231.8109.175`) or change to name to format like this.
171
+
- Change the **Internal Java Platform** to the JBR you added in step 2. (e.g. `IDEA JBR 21`).
172
+
- When you are done, your settings should look something like:
173
+
```
174
+
Name: IntelliJ IDEA Community Edition IC-243.23654.189
175
+
IntelliJ Platform Plugin SDK home path: /Applications/IntelliJ IDEA CE.app/Contents
176
+
Internal Java Platform: IDEA JBR 21
177
+
```
178
+
179
+
3. Set the SDK for the Project
180
+
- Select "Project Settings > Project"
181
+
- Change the "SDK" selection to the **IntelliJ Platform Plugin SDK** you added in step 3.
182
+
- When you are done, your settings should look something like:
183
+
```
184
+
SDK: IntelliJ IDEA Community Edition IC-243.23654.189
185
+
```
186
+
187
+
4. Configure the modules for the Project
188
+
- Select "Project Settings > Modules"
189
+
- Select the `flutter-intellij > flutter-idea` module
190
+
- Switch to the "Paths" window
191
+
- Select the **Inherit project compile output path** option then apply.
192
+
193
+
5. Change the modules SDK to the Project SDK
194
+
- Select "Project Settings > Modules"
195
+
- Select all the sub-directories under the `flutter-intellij > flutter-idea` module
196
+
- Switch to the "Dependencies" window
197
+
- Change the "Module SDK" selection to `Project SDK`.
198
+
199
+
### Configure the Gradle settings
200
+
201
+
1. From IntelliJ, Open the "Settings" dialog (`IntelliJ IDEA | Settings`).
0 commit comments