Gradle- double-tier multi-project? In Eclipse with .git folders?

白昼怎懂夜的黑 提交于 2019-12-11 03:59:57

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!