Skip to content

Commit

Permalink
Remove GradleProjectCache - it is very hard (probably impossible) to
Browse files Browse the repository at this point in the history
guess whether project model needs to be reloaded as there might be
infinitive number of scripts related to it (for example included by
"apply from: 'somescript.gradle'")
  • Loading branch information
adam-wyluda committed Aug 5, 2013
1 parent 928344f commit 7d8f935
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 66 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ public class GradleFacetImpl extends AbstractFacet<Project> implements GradleFac
private GradleModelLoader modelLoader;
@Inject
private ResourceFactory resourceFactory;
@Inject
private GradleProjectCache cache;

@Override
public boolean install()
Expand Down Expand Up @@ -66,15 +64,8 @@ public GradleModel getModel()
{
String buildScriptPath = new File(new File(getFaceted().getProjectRoot().getFullyQualifiedName()),
"build.gradle").getAbsolutePath();
// TODO Check if file has been modified since last use and reload
GradleModel model = cache.getModel(buildScriptPath);
if (model != null)
{
return model;
}
checkIfIsForgeLibraryInstalled(buildScriptPath);
model = loadModel(buildScriptPath);
cache.putModel(buildScriptPath, model);
GradleModel model = loadModel(buildScriptPath);
return model;
}
catch (IOException e)
Expand Down

This file was deleted.

0 comments on commit 7d8f935

Please sign in to comment.