Gradle - 如何一起构建 2 个多模块项目? (或来自其他项目的模块)
Gradle - How to build 2 multimodule projects together? (or a module from other project)
如何同时构建2个多模块项目? (或来自其他项目的模块)
几年没用后我又回到了gradle
并想一起编译更多模块
但是那些模块有自己的 settings.gradle
,所以看起来 gradle 认为它们是完全独立的项目,不能混合。至少我尝试时会出错。
示例项目https://github.com/emeraldpay/polkaj
我加例子一起编译
// compiling 6 examples together with the polkaj library
include(':balance')
project(':balance').projectDir = file('./examples/balance')
include(':encoding')
project(':encoding').projectDir = file('./examples/encoding')
include(':keys')
project(':keys').projectDir = file('./examples/keys')
include(':rpc')
project(':rpc').projectDir = file('./examples/rpc')
include(':runtime-explorer')
project(':runtime-explorer').projectDir = file('./examples/runtime-explorer')
include(':types')
project(':types').projectDir = file('./examples/types')
但随后出现类似
的错误
Project 'MyProject' not found in root project 'MyProject'.
Android: Project 'MyProject' not found in root project 'MyProject'
如何一起构建 2 个多模块项目?(或来自其他项目的模块)
如何同时构建2个多模块项目? (或来自其他项目的模块)
几年没用后我又回到了gradle
并想一起编译更多模块
但是那些模块有自己的 settings.gradle
,所以看起来 gradle 认为它们是完全独立的项目,不能混合。至少我尝试时会出错。
示例项目https://github.com/emeraldpay/polkaj
我加例子一起编译
// compiling 6 examples together with the polkaj library
include(':balance')
project(':balance').projectDir = file('./examples/balance')
include(':encoding')
project(':encoding').projectDir = file('./examples/encoding')
include(':keys')
project(':keys').projectDir = file('./examples/keys')
include(':rpc')
project(':rpc').projectDir = file('./examples/rpc')
include(':runtime-explorer')
project(':runtime-explorer').projectDir = file('./examples/runtime-explorer')
include(':types')
project(':types').projectDir = file('./examples/types')
但随后出现类似
的错误Project 'MyProject' not found in root project 'MyProject'.
Android: Project 'MyProject' not found in root project 'MyProject'
如何一起构建 2 个多模块项目?(或来自其他项目的模块)