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