mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
+5
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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('-')}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user