Skip to content

Commit 05ff570

Browse files
authored
Add instructions for converting to/from Gradle project (#5822)
1 parent d88c258 commit 05ff570

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

docs/building.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,17 @@ $ gsutil cp <path-to-archive> gs://flutter_infra/flutter/intellij/
2828

2929
Building is done by the `plugin` tool.
3030
See [tool/plugin/README.md](../tool/plugin/README.md) for details.
31+
32+
## Gradle vs IntelliJ projects
33+
34+
To debug unit tests the project needs to be opened as a Gradle project. Close the
35+
project in IntelliJ, then delete .idea/modules.xml. You may need to delete other
36+
files in ~/Library/Application Support/Caches/JetBrains/<IDE>/. Look in `conversion`
37+
and `external_build_systrm`. It may take some experimentation. When the project
38+
is opened in IntelliJ, ensure that there are `flutter-idea` and `flutter-studio`
39+
modules in the project structure.
40+
41+
To re-open the project as an IntelliJ (not Gradle) project, close it in IntelliJ,
42+
then restore .idea/modules.xml and delete .idea/gradle.xml. Again, you may need to
43+
remove some cached files from ~/Library/... as above. When the project is opened
44+
in IntelliJ there should only be one module, `flutter-intellij`.

src/io/flutter/editor/FlutterIconLineMarkerProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ private Icon getIconFromPackage(@Nullable PsiElement aPackage, @Nullable String
258258
if (aPackage == null) {
259259
// Looking for IconData with no package -- package specification not currently supported.
260260
final String relativeAssetPath = family.equals("MaterialIcons") ? MaterialRelativeAssetPath : CupertinoRelativeAssetPath;
261+
// TODO Base path is wrong for cupertino -- is there a test for this branch (IconData with cupertino family)?
261262
final IconPreviewGenerator generator = new IconPreviewGenerator(sdk.getHomePath() + relativeAssetPath);
262263
return generator.convert(code);
263264
}

0 commit comments

Comments
 (0)