我使用以下两个依赖项:
compile 'com.google.guava:guava:14.0.1'
compile 'com.google.guava:guava-gwt:14.0.1'
为了正常工作,两者必须是相同的版本。由于我的其他依赖项使用更高版本,Gradle会为每个依赖项使用不同的版本。
我通过运行 gradle dependencies
命令找到了这个问题:
compile - Compile classpath for source set 'main'.
+--- com.google.guava:guava:14.0.1 -> 17.0
+--- com.google.guava:guava-gwt:14.0.1
| +--- com.google.code.findbugs:jsr305:1.3.9
| \--- com.google.guava:guava:14.0.1 -> 17.0
我怎样可以强制Gradle为这两个依赖项设置相同的版本号?