defining subprojects in a deeply nested directory tree

北慕城南 提交于 2020-02-21 13:24:28

问题


how do I define sub projects in a nested directory tree where the sub-project folders are not immediate children of the root project

root
  lala
    A
  lulu
    B

Now I Want to add A & B as sub projects. If I do

//settings.gradle
include "lala:A", "lulu:B"

then also "lala" and "lulu" will be added as sub projects. However I only want to add A & B and nothing else.


回答1:


By default, Gradle assumes that the physical directory layout follows the logical project hierarchy, but you can reconfigure it any way you like. For example:

include "A", "B"

project(":A").projectDir = file("lala/A")
project(":B").projectDir = file("lala/B")


来源:https://stackoverflow.com/questions/20807490/defining-subprojects-in-a-deeply-nested-directory-tree

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