Skip to content
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

fix: Fallback to 7.4.2 when creating gradle connector #96

Merged
merged 1 commit into from
Oct 18, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ public enum GradleBuildKind {
/*
* From the used TAPI.
*/
TAPI;
TAPI,
/**
* Temporarily fallback to the default Gradle version used by Buildship (7.4.2).
*/
FALLBACK;
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ private Utils() {}
*/
private static final String GRADLE_USER_HOME = "GRADLE_USER_HOME";

private static final String DEFAULT_BUILDSHIP_GRADLE_VERSION = "7.4.2";

/**
* Get the Gradle connector for the project.
*
Expand Down Expand Up @@ -74,6 +76,9 @@ public static GradleConnector getProjectConnector(File project, Preferences pref
case SPECIFIED_INSTALLATION:
connector.useInstallation(getGradleHome(preferences.getGradleHome()));
break;
case FALLBACK:
connector.useGradleVersion(DEFAULT_BUILDSHIP_GRADLE_VERSION);
break;
default:
connector.useBuildDistribution();
break;
Expand Down Expand Up @@ -247,6 +252,8 @@ public static GradleBuildKind getEffectiveBuildKind(File projectRoot, Preference
return GradleBuildKind.SPECIFIED_INSTALLATION;
}

return GradleBuildKind.TAPI;
// TODO: Once we figure out why TAPI fails a lot, we can enable it.
// return GradleBuildKind.TAPI;
return GradleBuildKind.FALLBACK;
}
}
Loading