Skip to content

Commit

Permalink
Refactor GradleModel.getProjectDirectory() -> getProjectPath()
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-wyluda committed Aug 23, 2013
1 parent d366aac commit 2791ec8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public interface GradleModel

String getProjectPath();

String getRootProjectDirectory();
String getRootProjectPath();

String getPackaging();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public FileResource<?> getBuildScriptResource()
public FileResource<?> getSettingsScriptResource()
{
return (FileResource<?>) resourceFactory.create(FileResource.class, new File(
getModel().getRootProjectDirectory(), "settings.gradle"));
getModel().getRootProjectPath(), "settings.gradle"));
}

private void loadModel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class GradleModelImpl implements GradleModel
private String name;
private String version;
private String projectPath;
private String rootProjectDirectory;
private String rootProjectPath;
private String packaging;
private String archivePath;
private List<GradleTask> tasks;
Expand All @@ -51,7 +51,7 @@ public GradleModelImpl()
this.group = "";
this.name = "";
this.projectPath = "";
this.rootProjectDirectory = "";
this.rootProjectPath = "";
this.version = "";
this.packaging = "";
this.archivePath = "";
Expand Down Expand Up @@ -81,7 +81,7 @@ public GradleModelImpl(String group, String name, String version,
this.group = group;
this.name = name;
this.projectPath = projectPath;
this.rootProjectDirectory = rootProjectDirectory;
this.rootProjectPath = rootProjectDirectory;
this.version = version;
this.packaging = packaging;
this.archivePath = archivePath;
Expand All @@ -104,7 +104,7 @@ public GradleModelImpl(GradleModel original)
this.group = original.getGroup();
this.name = original.getName();
this.projectPath = original.getProjectPath();
this.rootProjectDirectory = original.getRootProjectDirectory();
this.rootProjectPath = original.getRootProjectPath();
this.version = original.getVersion();
this.packaging = original.getPackaging();
this.archivePath = original.getArchivePath();
Expand Down Expand Up @@ -163,9 +163,9 @@ public String getProjectPath()
}

@Override
public String getRootProjectDirectory()
public String getRootProjectPath()
{
return rootProjectDirectory;
return rootProjectPath;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ public void testProjectPath()
}

@Test
public void testRootProjectDirectory()
public void testRootProjectPath()
{
// No idea for a better test
assertTrue(model.getRootProjectDirectory().replace('\\', '/').endsWith("src/test/resources/loader"));
assertTrue(model.getRootProjectPath().replace('\\', '/').endsWith("src/test/resources/loader"));
}

@Test
Expand Down

0 comments on commit 2791ec8

Please sign in to comment.