问题
A few months back I asked this question about multiprojects with neighboring project folder dependencies.
I have a similar problem but with one complication. In each "project" folder, I put the .git folder and the actual project folder. So it is the same structure except I have to move up and move down two levels.
|
\ workspace
|
\
MyProject
|
\
MyProject //contains src and build.gradle
.git
|
\
DependencyA
|
\
DependencyA //contains src and build.gradle
.git
I have tried to put this into my settings.gradle file for MyProject
include '..:..:DependencyA:DependencyA'
and this dependency setup in my build.gradle
.
dependencies {
compile project(':..:..:DependencyA:DependencyA')
}
I get an error saying Project with path ':..:..:DependencyA:DependencyA' could not be found in root project 'MyProject'
I am suspecting I do not understand how ..
works and it is not like a Linux "move up one directory" command. What am I doing wrong? Or perhaps I'm just not mixing GIT and Gradle properly.
UPDATE
Eclipse is having issues with this even though I remedied the typo. I'm having deja vu and dealt with this before and ultimately used flatMap, but I don't know how to flatMap a double nested multi-project. It is having a bad time interpreting the ..
来源:https://stackoverflow.com/questions/32634318/gradle-double-tier-multi-project-in-eclipse-with-git-folders