gradle includes transitive runtime dependency as compile dependency
See this Q&A. If you don't specify a configuration, Gradle will choose the default
configuration which extends from runtime
. A quick fix is to use
compile project(path: ":B", configuration: "compile")