Skip to content

Commit a21684f

Browse files
committed
Try to fix multi invocation problem
1 parent 3697210 commit a21684f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

subprojects/studio-plugin/src/main/java/org/gradle/profiler/studio/plugin/client/GradleProfilerClient.java

+6
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ private void handleSyncRequest(StudioRequest request, Project project, GradleSys
7474

7575
// In some cases sync could happen before we trigger it,
7676
// for example when we open a project for the first time.
77+
// Wait in case Gradle sync is run before indexing
7778
waitOnPreviousGradleSyncFinish(project);
79+
// Wait on initial indexing
80+
waitOnBackgroundProcessesFinish(project);
81+
// Wait in case Gradle sync is run after indexing
82+
waitOnPreviousGradleSyncFinish(project);
83+
// Wait on indexing after sync
7884
waitOnBackgroundProcessesFinish(project);
7985

8086
LOG.info(String.format("[SYNC REQUEST %s] Sync has started%n", request.getId()));

0 commit comments

Comments
 (0)