This is not a duplicate, as these other solutions do not work.
I have a subproject:
: Common: widget
gradle.build (subproject) resembles this:
configurations {providedCompile} dependencies { compile project(":commons:other-widget") ...other dependencies... }
If you show dependencies:
+--- project :commons:some-other-project +--- project :commons:exclude-me-project (*) \--- org.apache.cxf:cxf-rt-frontend-jaxrs: -> 3.0.3 (*)
What does not work:
Any regular syntax. I have tried all the options that I can think of. I even went looking for the API, but could not find what I needed there.
In this section of the project dependencies: ...
compile project(":commons:some-other-project") { exclude (":commons:exclude-me-project") }
Result:
Could not find method exclude() for arguments [:commons:some-other-project] on project
I also tried:
compile ( project (':commons:some-other-project') ) { transitive = false }
Result: instead of removing the dependencies ": commons: some-other-project", it removes the ": commons: some-other-project".
I have a large and complex project to convert. I have a lot of this kind of work ahead. Given a project as a dependency, how can I exclude things from it?
dependencies gradle
user447607
source share