Gradle多模块项目

时间:2017-03-26 14:11:09

标签: java gradle

抱歉,我是gradle的新手,但已经花了很多时间来配置我的项目。

我有以下gradle项目结构(gradle projects):

Root project 'app'
+--- Project ':analytics'
|    +--- Project ':analytics:lambda-1'
|    |    \--- Project ':analytics:lambda-1:api'
|    \--- Project ':analytics:lambda-2'
|         \--- Project ':analytics:lambda-2:api'
\--- Project ':back'

Root settings.gradle包含所有模块:

include 'back'
include 'analytics'

include 'analytics:lambda-1'
include 'analytics:lambda-1:api'
include 'analytics:lambda-2'
include 'analytics:lambda-2:api'

我想要实现的是:back取决于:analytics:lambda-1:api:analytics:lambda-2:api

但不幸的是,我有编译错误,analytics:lambda-1:api中只有一个({1}}实际包含在构建路径中。

compile project

Gradle版本:project(':back') { dependencies { compile project(':analytics:lambda-1:api') compile project(':analytics:lambda-2:api') } }

有人可以帮帮我吗?

0 个答案:

没有答案