我的项目有一个子项目“核心”,并且在核心内部我想要一个单独的子项目“强制”。它所要做的就是生成一个源文件并对其进行编译,但这取决于已编译的“核心”,因为代码生成器就在那里。我希望将 .gradle 文件称为 coercion.gradle。
所以我在 settings.gradle 中尝试了这个
include 'core'
include "coercion"
project(':coercion').projectDir = file(settingsDir)
project(":coercion").buildFileName = "coercion.gradle"
这给了我一个错误:
* What went wrong:
Could not select the default project for this build. Multiple projects
in this build have project directory
'/Users/montyzukowski/temboo/development/branches/capella-github-build':
[root project 'capella-github-build', project ':coercion']
是否有可能让 coercion.gradle 存在于“核心”的子目录中,或者这会扰乱 gradle 的依赖分析?