exclude
for dependencies has a little bit another syntax, so try to do it providing the module name, which is equals to the exclude-me-project
name, like:
compile(project(":commons:some-other-project")) {
exclude module: "exclude-me-project"
}
Alternatively, you may exclude all the transitive dependencies for commons
project, but it will remove all the deps of the some-other-project
project, including the exclude-me-project
:
compile(project(":commons:some-other-project")) {
transitive = false
}