在 gradle 中,我可以编译本地模块并将其用作其他 'external' 库的依赖项吗?
In gradle, can I compile a local module and use that as dependencies for other 'external' libraries?
我在我的项目中使用了 Exoplayer 的分支,我将其作为 git 子模块包含在内并与我的其他模块一起编译:
compile project(':libraries:exoplayer:library')
现在我正在尝试 link 使用一个在其 pom 文件中明确依赖于 exoplayer 的外部 SDK:
<dependency>
<groupId>com.google.android.exoplayer</groupId>
<artifactId>exoplayer</artifactId>
<version>r1.4.2</version>
<scope>compile</scope>
</dependency>
如何告诉 gradle 使用 exoplayer 的分支而不是 jcenter 的分支?
你可以像这样忽略传递依赖:
dependencies{
compile('your:external:sdk') {
exclude group: 'com.google.android.exoplayer', module: 'exoplayer'
}
}
我在我的项目中使用了 Exoplayer 的分支,我将其作为 git 子模块包含在内并与我的其他模块一起编译:
compile project(':libraries:exoplayer:library')
现在我正在尝试 link 使用一个在其 pom 文件中明确依赖于 exoplayer 的外部 SDK:
<dependency>
<groupId>com.google.android.exoplayer</groupId>
<artifactId>exoplayer</artifactId>
<version>r1.4.2</version>
<scope>compile</scope>
</dependency>
如何告诉 gradle 使用 exoplayer 的分支而不是 jcenter 的分支?
你可以像这样忽略传递依赖:
dependencies{
compile('your:external:sdk') {
exclude group: 'com.google.android.exoplayer', module: 'exoplayer'
}
}