jgr*_*owl 36 java dependency-injection guice dependency-management gradle
假设我想在我的项目中添加guice-assistedinject作为依赖项.它将guice工件指定为依赖本身.如何告诉它使用no_aop版本的guice?
我知道我可以做到以下几点,但我可以一步完成而不排除guice模块吗?
dependencies {
compile (group: 'com.google.inject.extensions', name: 'guice-assistedinject', version: '3.0') {
exclude module: 'guice'
}
compile group: 'com.google.inject', name: 'guice', version: '3.0', classifier: 'no_aop'
}
Run Code Online (Sandbox Code Playgroud)
Pet*_*ser 62
没有更简单的解决方案.您可以使用短依赖符号(例如"com.google.inject:guice:3.0:no_aop"
)缩短代码.