Dee*_*aik 3 android build.gradle android-gradle-plugin
我正在尝试编写一个gradle脚本,我想忽略或从jar文件中排除某些模块或组.
我的代码:
dependencies {
compile fileTree(dir: "$buildDir/native-libs", include: 'native-libs.jar')
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/test.jar')
}
Run Code Online (Sandbox Code Playgroud)
所以,从test.jar文件我想要排除'com.xyz.abc',但我不知道如何编写脚本.
请告诉我,建议我一些好的解决方案.
尝试排除传递依赖的描述在这里:
您可以通过配置或依赖项排除传递依赖关系:
例52.14.排除传递依赖
的build.gradle
configurations {
compile.exclude module: 'commons'
all*.exclude group: 'org.gradle.test.excludes', module: 'reports'
}
dependencies {
compile("org.gradle.test.excludes:api:1.0") {
exclude module: 'shared'
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7114 次 |
| 最近记录: |