use of de.dagere.peass.execution.gradle.GradleBuildfileEditor in project peass by DaGeRe.
the class TestBuildGradle method updateGradleFile.
private String updateGradleFile(final File gradleFile) throws IOException {
final File destFile = copyGradlefile(gradleFile);
GradleBuildfileEditor editor = new GradleBuildfileEditor(mockedTransformer, destFile, new ProjectModules(CURRENT));
editor.addDependencies(new File("xyz"));
final String gradleFileContents = FileUtils.readFileToString(destFile, Charset.defaultCharset());
return gradleFileContents;
}
use of de.dagere.peass.execution.gradle.GradleBuildfileEditor in project peass by DaGeRe.
the class TestBuildGradle method testNoUpdate.
@Test
public void testNoUpdate() throws IOException {
final File gradleFile = new File(GRADLE_BUILDFILE_FOLDER, "differentPlugin.gradle");
final File destFile = copyGradlefile(gradleFile);
GradleBuildfileEditor editor = new GradleBuildfileEditor(mockedTransformer, destFile, new ProjectModules(CURRENT));
editor.addDependencies(new File("xyz"));
Assert.assertTrue(FileUtils.contentEquals(gradleFile, destFile));
}
Aggregations