IDEA-76142: Gradle support - cannot update IDEA projects once one of build.gradle files changes

1. Explicit method call syntax is applied (server compilation fails otherwise);
2. Comments are added;
This commit is contained in:
Denis.Zhdanov
2012-01-31 18:10:20 +04:00
parent 4fbb6b8662
commit eb5cf8ebff
2 changed files with 6 additions and 1 deletions
@@ -55,6 +55,7 @@ public class GradleProjectStructureChangesModelTest {
@Test
public void mergeGradleLocalToIntellij() {
// Configure initial projects state.
init(
gradle {
module {
@@ -70,6 +71,7 @@ public class GradleProjectStructureChangesModelTest {
} } }
)
// Check that the initial projects state is correctly parsed.
checkChanges {
presence {
lib(gradle: gradle.modules.dependencies.flatten().findAll { it.name == "lib2" })
@@ -82,11 +84,14 @@ public class GradleProjectStructureChangesModelTest {
lib2('gradle')
} } } }
// Define changed project state.
gradle {
module {
dependencies {
lib(name: "lib1")
} } }
// Apply the changed project state and check if it's correctly parsed.
changesModel.update(gradle.project)
assertEquals([].toSet(), changesModel.changes)
checkTree {
@@ -38,7 +38,7 @@ class ProjectStructureChecker {
check it as Node, actual.getChildAt(childIndex++) as DefaultMutableTreeNode
}
if (childIndex < actual.childCount) {
fail("Unexpected nodes detected: ${(childIndex..<actual.childCount).collect { actual.getChildAt(it) } join '-'}")
fail("Unexpected nodes detected: ${(childIndex..<actual.childCount).collect { actual.getChildAt(it) }.join('-')}")
}
}