use of com.android.tools.idea.gradle.project.sync.hyperlink.CreateGradleWrapperHyperlink in project android by JetBrains.
the class Gradle2RequiredErrorHandler method getQuickFixHyperlinks.
@Override
@NotNull
protected List<NotificationHyperlink> getQuickFixHyperlinks(@NotNull NotificationData notification, @NotNull Project project, @NotNull String text) {
List<NotificationHyperlink> hyperlinks = new ArrayList<>();
hyperlinks.add(new CreateGradleWrapperHyperlink());
return hyperlinks;
}
use of com.android.tools.idea.gradle.project.sync.hyperlink.CreateGradleWrapperHyperlink in project android by JetBrains.
the class UnsupportedGradleVersionErrorHandler method getQuickFixHyperlinks.
@NotNull
public static List<NotificationHyperlink> getQuickFixHyperlinks(@NotNull Project project, @Nullable String gradleVersion) {
List<NotificationHyperlink> hyperlinks = new ArrayList<>();
GradleWrapper gradleWrapper = GradleWrapper.find(project);
if (gradleWrapper != null) {
// It is very likely that we need to fix the model version as well. Do everything in one shot.
NotificationHyperlink hyperlink = createIfProjectUsesGradleWrapper(project, gradleVersion);
if (hyperlink != null) {
hyperlinks.add(hyperlink);
}
} else {
GradleProjectSettings gradleProjectSettings = GradleProjectSettingsFinder.getInstance().findGradleProjectSettings(project);
if (gradleProjectSettings != null && gradleProjectSettings.getDistributionType() == DistributionType.LOCAL) {
hyperlinks.add(new CreateGradleWrapperHyperlink());
}
}
hyperlinks.add(new OpenGradleSettingsHyperlink());
return hyperlinks;
}
Aggregations