alexvasilkov / GradleGitDependenciesPlugin

Gradle plugin to add external git repos as project dependencies
Apache License 2.0
106 stars 15 forks source link

VCS syncing issues with multiple AS project windows #1

Closed SupasinTatiyanupanwong closed 4 years ago

SupasinTatiyanupanwong commented 5 years ago

Let's say we have 2 Android Studio (AS) projects with AS has multiple windows enabled. Project A has VCS dependency of A_ApiModule Project B has VCS dependency of B_ApiModule

When open project A in AS and let it finished syncing Gradle, everything works just fine here (repo of A_ApiModule is cloned into dir of A/libraries/A_ApiModule). Now if we'll open project B in another AS window and let it sync Gradle, the scenarios are as follows:

  1. B_ApiModule is correctly cloned into dir of B/libraries/B_ApiModule
  2. After that, content in A_ApiModule dir of A/libraries/A_ApiModule are cleared (except IDE generated file, e.g. *.iml, and the folder itself is not removed)
  3. B_ApiModule is now also cloned into dir of A/libraries/B_ApiModule

Now, when we going back to work on project A again, we'll need to remove VCS dir and resync the Gradle again. Otherwise, the project will failed with message of Destination path "A_ApiModule" already exists and is not an empty directory (since its content is removed as mentioned in 2.)

Updated: Sometime it in this sequence:

  1. B_ApiModule is cloned into dir of A/libraries/B_ApiModule (no VCS dir created in project B directory)
  2. Project B finished syncing with failed.

Gradle 4.6 : Android Studio 3.2.1

alexvasilkov commented 4 years ago

This should be fixed in v2.0.0. Can you please check it?

SupasinTatiyanupanwong commented 4 years ago

Looks like it works as expected now. No issues so far. Thanks!