Hello All,
We have a library, lets call it "LibraryA" that gets included by "ProjectA" in the main build. So our settings.gradle file looks like this:
.
include ':ProjectA'
include ':LibraryA'
.
ProjectA declares LibraryA as an implementation dependency in it's build.gradle file.
We also use the same LibraryA in our buildSrc project. So our buildSrc directory has a separate settings.gradle file and looks like this:
include ':LibraryA'
project(':LibraryA').projectDir = new File(settingsDir, '../LibraryA')
The build.gradle file that lies in the buildSrc directory also declares LibraryA as an implementation dependency.
This allows us to use the same library without having to copy it into the buildSrc directory. This approach worked fine with Gradle 4.4 which was the last version we were using before upgrading to 4.10.2. After upgrading to 4.10.2 we are getting this error when trying to sync in Android Studio:
Unable to find module with Gradle path 'LibraryA' (needed by module 'buildSrc'.)
Reverting back to 4.4 makes this error go away. We only seem to get this error when trying to sync in Android Studio, it builds fine in the command line. Is this a bug or is this type of configuration not supposed to be allowed? Any help would be appreciated, thanks a lot.
Working setup:
Gradle version - 4.4
Android Studio version - 3.2
Android gradle plugin version - 3.1.2
Non-working setup:
Gradle version 4.10.2
Android Studio version 3.2
Android gradle plugin version - 3.1.2