use of com.android.tools.idea.gradle.project.sync.GradleSyncSummary in project android by JetBrains.
the class VersionCompatibilityCheckerIntegrationTest method CheckGradle2_14_1AndPlugin2_1_2.
// Disabled. It runs locally but in CI fails with the error:
// "No cached version of com.android.tools.build:gradle:2.1.2 available for offline mode."
// This is something that needs to be fixed in the CI server.
public void CheckGradle2_14_1AndPlugin2_1_2() throws Exception {
loadSimpleApplication();
Project project = getProject();
AndroidPluginVersionUpdater.UpdateResult updateResult = AndroidPluginVersionUpdater.getInstance(project).updatePluginVersion(GradleVersion.parse("2.1.2"), null);
assertTrue(updateResult.isPluginVersionUpdated());
assertTrue(updateResult.versionUpdateSuccess());
requestSyncAndWait();
String expectedError = "Gradle 2.14.1 requires Android Gradle plugin 2.1.3 (or newer) but project is using version 2.1.2.";
SyncMessage message = mySyncMessagesStub.getFirstReportedMessage();
// @formatter:off
assertAbout(syncMessage()).that(message).hasType(ERROR).hasMessageLine(expectedError, 0);
// @formatter:on
GradleSyncSummary summary = GradleSyncState.getInstance(project).getSummary();
assertTrue(summary.hasSyncErrors());
}
Aggregations