2015-02-06 57 views
0


/*
*有重复rocon_app_manager_msgs:v0.6.9和0.7.8
* common_tools必须v0.7.8
* robot_remocon必须有0.6.9。
*所以这里是一个解决方案,robot_remocon编译:
*仅针对该项目排除rocon_app_manager_msgs v0.7.8。
*/排除特定版本的jar或模块文件?

compile 'org.ros.rosjava_messages:rocon_app_manager_msgs:[0.6,0.7)' 
compile project(':common_tools') 

我想排除rocon_app_manager_msgs,0.7.8v及以上的特定版本。

我尝试这样:

configurations { 
    all*.exclude group: 'org.ros.rosjava_messages', module: 'rocon_app_manager_msgs:0.7+' 
} 

和其他类似的选项,但它不工作。

你能帮助我吗?

+0

你能解释更多的情况?为什么如果版本不匹配你不想排除? – 2015-02-06 10:57:17

+0

我没有看到一种方法来做你想做的。 Gradle排除规则的API文档位于https://gradle.org/docs/current/javadoc/org/gradle/api/artifacts/ExcludeRule.html – 2015-02-06 16:35:04

回答

0

我解决它没有配置: 我只是用transtive = false以具体项目:

compile (project(':common_tools')) { 
      transitive = false 
} 

我希望这将有助于其他。

Tal。