Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComposingBuild的项目在AS中make project报错 #2

Closed
wankey opened this issue Jun 12, 2020 · 8 comments
Closed

ComposingBuild的项目在AS中make project报错 #2

wankey opened this issue Jun 12, 2020 · 8 comments

Comments

@wankey
Copy link

wankey commented Jun 12, 2020

ComposingBuild的项目在AS中make project报错

Project directory '/Users/username/Downloads/ComposingBuilds-vs-buildSrc-master/Project-ComposingBuild/versionPlugin' is not part of the build defined by settings file '/Users/username/Downloads/ComposingBuilds-vs-buildSrc-master/Project-ComposingBuild/settings.gradle'. If this is an unrelated build, it must have its own settings file.

@hi-dhl
Copy link
Owner

hi-dhl commented Jun 15, 2020

@wankey 已经修复,辛苦,请更新代码,在试一下

@hi-dhl
Copy link
Owner

hi-dhl commented Jun 15, 2020

@wankey 注意这段话includeBuild("../versionPlugin") ,versionPlugin 插件,不能放到 project 下面,应该放到 project 以外的目录,或者和 project 同级目录,如下所示:

image

@wankey
Copy link
Author

wankey commented Jun 21, 2020

已正常

@wankey wankey closed this as completed Jun 21, 2020
@MankinChung
Copy link

@wankey 注意这段话includeBuild("../versionPlugin") ,versionPlugin 插件,不能放到 project 下面,应该放到 project 以外的目录,或者和 project 同级目录,如下所示:

image

有个问题,放在项目外面,不在版本管控范围内了。新项目还可以以父目录作为根目录,但旧项目的话就改不了了

@hi-dhl
Copy link
Owner

hi-dhl commented Jul 6, 2020

有点不太明白,ComposingBuilds 在多项目更具有优势,新旧项目引用它应该直接就可以用了, 你说的 「不在版本管控范围内了」 这句话,你指的库的版本管理吗?

@MankinChung
Copy link

有点不太明白,ComposingBuilds 在多项目更具有优势,新旧项目引用它应该直接就可以用了, 你说的 「不在版本管控范围内了」 这句话,你指的库的版本管理吗?

我的意思是,要把VersionPlugin(主要是Versions)和项目一起加入git管理,做统一的版本管控。但是旧项目的话,是以项目路径作为git根目录的,项目外的VersionPlugin就不在git管理范围了

@hi-dhl
Copy link
Owner

hi-dhl commented Jul 7, 2020

@MankinChung 两个方案:
方案一: VersionPlugin 可以放在项目下,可以正常编译, 也不会影响 Jenkins 打包,不过clean 或者 make 的时候会提示 “not part of the build defined by settings file”
方案二:将 VersionPlugin 当做一个 git 去管理就好了,旧项目可以直接引入,对项目本身不会有影响

@MankinChung
Copy link

@hi-dhl 嗯,方案二的submodule可以完美解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants