Skip to content
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ intellij {
localPath "${project.rootDir.absolutePath}/artifacts/$ide"
downloadSources false
def pluginList = [project(':flutter-idea'), "java", "Dart:$dartVersion", "properties", "junit", "Git4Idea",
"Kotlin", "gradle", "android", "Groovy", "smali", "IntelliLang"]
"Kotlin", "gradle", "org.jetbrains.android", "Groovy", "smali", "IntelliLang"]
if (ide == 'android-studio') {
pluginList.add(project(':flutter-studio'))
} else if ("$buildSpec" == '2020.3') {
Expand Down
2 changes: 1 addition & 1 deletion flutter-idea/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ intellij {
downloadSources false
localPath "${project.rootDir.absolutePath}/artifacts/$ide"
plugins "java", "Dart:$dartVersion", "properties", "junit", "Kotlin", "Git4Idea",
"gradle", "android", "Groovy", "smali", "IntelliLang"
"gradle", "Groovy", "smali", "IntelliLang", "org.jetbrains.android"
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion flutter-studio/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ intellij {
downloadSources false
localPath "${project.rootDir.absolutePath}/artifacts/$ide"
plugins "java", "Dart:$dartVersion", "properties", "junit",
"gradle", "android", "Groovy", "smali", "IntelliLang", "android"//"org.jetbrains.android"
"gradle", "Groovy", "smali", "IntelliLang", "org.jetbrains.android"
}

sourceSets {
Expand Down
4 changes: 4 additions & 0 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<version>SNAPSHOT</version>
<idea-version since-build="201.7223" until-build="203.*"/>

<depends>com.intellij.modules.platform</depends>
<depends>com.intellij.modules.lang</depends>
<depends>com.intellij.modules.xdebugger</depends>
<depends>org.jetbrains.android</depends>
<depends>Dart</depends>
<depends>Git4Idea</depends>

Expand Down
4 changes: 4 additions & 0 deletions resources/META-INF/plugin_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
@VERSION@
<idea-version since-build="@SINCE@" until-build="@UNTIL@"/>

<depends>com.intellij.modules.platform</depends>
<depends>com.intellij.modules.lang</depends>
<depends>com.intellij.modules.xdebugger</depends>
<depends>org.jetbrains.android</depends>
<depends>Dart</depends>
<depends>Git4Idea</depends>

Expand Down
17 changes: 11 additions & 6 deletions src/io/flutter/ProjectOpenActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ public void runActivity(@NotNull Project project) {
if (FlutterSettings.getInstance().isEnableEmbeddedBrowsers()) {
JxBrowserManager.getInstance().setUp(project);
}
excludeAndroidFrameworkDetector(project);

final FlutterSdk sdk = FlutterSdk.getIncomplete(project);
if (sdk == null) {
// We can't do anything without a Flutter SDK.
// Note: this branch is taken when opening a project immediately after creating it -- not sure that is expected.
return;
}
// TODO(messick) Re-enable this after dropping support for 2020.2.
//excludeAndroidFrameworkDetector(project);

// Report time when indexing finishes.
DumbService.getInstance(project).runWhenSmart(() -> {
Expand Down Expand Up @@ -101,10 +101,14 @@ public void runActivity(@NotNull Project project) {
}

private static void excludeAndroidFrameworkDetector(@NotNull Project project) {
DetectionExcludesConfiguration excludesConfiguration = DetectionExcludesConfiguration.getInstance(project);
FrameworkType type = new AndroidFrameworkDetector().getFrameworkType();
if (!excludesConfiguration.isExcludedFromDetection(type)) {
excludesConfiguration.addExcludedFramework(type);
try {
final DetectionExcludesConfiguration excludesConfiguration = DetectionExcludesConfiguration.getInstance(project);
final FrameworkType type = new AndroidFrameworkDetector().getFrameworkType();
if (!excludesConfiguration.isExcludedFromDetection(type)) {
excludesConfiguration.addExcludedFramework(type);
}
} catch (NoClassDefFoundError ignored) {
// This should never happen. But just in case ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: mention the bug where this has happened.

}
}

Expand All @@ -121,6 +125,7 @@ public PackagesOutOfDateNotification(@NotNull Project project, @NotNull PubRoot
myProject = project;
myRoot = root;

//noinspection DialogTitleCapitalization
addAction(new AnAction("Run 'flutter pub get'") {
@Override
public void actionPerformed(@NotNull AnActionEvent event) {
Expand Down