'Gradle projects need to be imported' notification for already refreshed project

Answered

Hi,

I have an issue with programmatic external project refresh.

We are using IC-183.4284.148

We have some logic that modifies build.gradle file or both build.gradle and settings.gradle files of the projects. After that ExternalSystemUtil.refreshProjects() is called, if auto-import is disabled for the project.

In case of modification of one file everything is OK. But if two files modified, 'Gradle projects need to be imported' notification is shown after refresh.

After investigation I found that this behavior caused by the code in 

ExternalSystemProjectsWatcherImpl:202
if (!current.equals(newCrc)) {
scheduleUpdate(externalProjectPath, false);
}

In case of more than one document modified, here the CRCs of different files are compared. Clearly they are different, and scheduleUpdate is called for up-to-date project.

Is it a bug, or I just didn't get something?

0
1 comment

Hi,

It looks like a bug, thanks for reporting, you can follow the issue at https://youtrack.jetbrains.com/issue/IDEA-203656 

0

Please sign in to leave a comment.