-
Notifications
You must be signed in to change notification settings - Fork 171
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
Add configuration option to use CACHED_ONLY strategy for downloading published Gradle versions #998
Conversation
…tegy specified Also, the current version is returned if the cache file is not present
publishedVersions.versions.size() == 1 | ||
publishedVersions.versions[0].version == GradleVersion.current().getVersion() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -70,6 +71,16 @@ protected void canceling() { | |||
Thread.currentThread().interrupt(); | |||
} | |||
|
|||
private LookupStrategy getLookupStrategy() { | |||
String strategyName = InstanceScope.INSTANCE.getNode(CorePlugin.PLUGIN_ID).get("publishedgradleversions.lookupstrategy", LookupStrategy.REMOTE_IF_NOT_CACHED.name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So to avoid remote interaction, I'll need to set publishedgradleversions.lookupstrategy=CACHED_ONLY
somewhere, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the idea, yes. Right now there's no UI, but you can use tools like oomph to configure IDE preferences. Without that, you'll need to figure out in which folder does Eclipse (and VSCode Java for that matter) puts the workspace. you need to add the org.eclipse.buildship.core.publishedgradleversions.lookupstrategy=CACHED_ONLY
entry to the ${workspace_loc}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.buildship.core.prefs
file.
...in/groovy/org/eclipse/buildship/core/internal/util/gradle/PublishedGradleVersionsTest.groovy
Outdated
Show resolved
Hide resolved
...in/groovy/org/eclipse/buildship/core/internal/util/gradle/PublishedGradleVersionsTest.groovy
Outdated
Show resolved
Hide resolved
@DPUkyle Have tried out these changes. Is this useful in any way or should we look for an alternative? |
Hi Donat. I'm trying to work with my Microsoft colleague @testforstephen who works on VS Code. I'm hoping he knows how to make an eclipse build with this change in buildship (I'm an IJ guy, don't kill me :) ). |
Closing due to inactivity. Let me know if we should reopen this issue. |
No description provided.