Skip to content

Add instructions for converting to/from Gradle project #5822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,17 @@ $ gsutil cp <path-to-archive> gs://flutter_infra/flutter/intellij/

Building is done by the `plugin` tool.
See [tool/plugin/README.md](../tool/plugin/README.md) for details.

## Gradle vs IntelliJ projects

To debug unit tests the project needs to be opened as a Gradle project. Close the
project in IntelliJ, then delete .idea/modules.xml. You may need to delete other
files in ~/Library/Application Support/Caches/JetBrains/<IDE>/. Look in `conversion`
and `external_build_systrm`. It may take some experimentation. When the project
is opened in IntelliJ, ensure that there are `flutter-idea` and `flutter-studio`
modules in the project structure.

To re-open the project as an IntelliJ (not Gradle) project, close it in IntelliJ,
then restore .idea/modules.xml and delete .idea/gradle.xml. Again, you may need to
remove some cached files from ~/Library/... as above. When the project is opened
in IntelliJ there should only be one module, `flutter-intellij`.
1 change: 1 addition & 0 deletions src/io/flutter/editor/FlutterIconLineMarkerProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ private Icon getIconFromPackage(@Nullable PsiElement aPackage, @Nullable String
if (aPackage == null) {
// Looking for IconData with no package -- package specification not currently supported.
final String relativeAssetPath = family.equals("MaterialIcons") ? MaterialRelativeAssetPath : CupertinoRelativeAssetPath;
// TODO Base path is wrong for cupertino -- is there a test for this branch (IconData with cupertino family)?
final IconPreviewGenerator generator = new IconPreviewGenerator(sdk.getHomePath() + relativeAssetPath);
return generator.convert(code);
}
Expand Down