use of org.jetbrains.plugins.gradle.settings.GradleProjectSettings in project android by JetBrains.
the class GradleProjectSettingsFinderTest method testWithNonGradleProject.
public void testWithNonGradleProject() {
Project project = getProject();
GradleProjectSettings settings = mySettingsFinder.findGradleProjectSettings(project);
assertNull(settings);
}
use of org.jetbrains.plugins.gradle.settings.GradleProjectSettings in project android by JetBrains.
the class GradleVersionsTest method testReadGradleVersionFromWrapper.
public void testReadGradleVersionFromWrapper() throws Exception {
loadSimpleApplication();
Project project = getProject();
simulateGradleSyncStateReturnNullGradleVersion();
GradleProjectSettings settings = new GradleProjectSettings();
settings.setDistributionType(DEFAULT_WRAPPED);
when(mySettingsFinder.findGradleProjectSettings(any())).thenReturn(settings);
String expected = getGradleVersionFromWrapper();
GradleVersion gradleVersion = myGradleVersions.getGradleVersion(project);
assertNotNull(gradleVersion);
assertEquals(expected, gradleVersion.toString());
}
use of org.jetbrains.plugins.gradle.settings.GradleProjectSettings in project android by JetBrains.
the class GradleDistributionCleanUpTaskTest method testAutomaticCreationOfMissingWrapper.
// See https://code.google.com/p/android/issues/detail?id=66880
public void testAutomaticCreationOfMissingWrapper() throws Exception {
loadSimpleApplication();
deleteGradleWrapper();
GradleProjectSettings settings = doGetGradleProjectSettings();
settings.setDistributionType(DEFAULT_WRAPPED);
myCleanUpTask.cleanUp(getProject());
verifyGradleWrapperExists();
}
use of org.jetbrains.plugins.gradle.settings.GradleProjectSettings in project android by JetBrains.
the class GradleDistributionCleanUpTaskTest method doGetGradleProjectSettings.
@NotNull
private GradleProjectSettings doGetGradleProjectSettings() {
GradleProjectSettings settings = GradleProjectSettingsFinder.getInstance().findGradleProjectSettings(getProject());
assertNotNull(settings);
return settings;
}
use of org.jetbrains.plugins.gradle.settings.GradleProjectSettings in project android by JetBrains.
the class GradleDistributionCleanUpTaskTest method setGradleLocalDistribution.
private void setGradleLocalDistribution(@NotNull String gradleLocalDistributionPath) {
GradleProjectSettings settings = doGetGradleProjectSettings();
settings.setDistributionType(LOCAL);
settings.setGradleHome(gradleLocalDistributionPath);
}
Aggregations