Hello, I’ve got a multi-module project with multiple services that each have a ‘validator’ sub-module. I wanted to use the ‘validator’ module of each service as a dependency on my front-end client to validate changes to the service properties. However, whenever I import the projects in the module, it only imports one of the dependencies (not the other).
services
├── archive-service
│ ├── build.gradle
│ ├── gradle.properties
│ ├── core
│ └── validator
└── copy-service
├── build.gradle
├── gradle.properties
├── core
└── validator
In the front end service, I added both service validators as dependencies:
dependencies {
providedCompile project(':services:copy-service:validator')
providedCompile project(':services:archive-service:validator')
}
The project builds successfully, but it only pulls in the Java code from the copy-service dependency and not from the archive-service. If I reverse their order, then it gets the ‘archive-service’ and not the copy-service. I’ve found a work around, by renaming the module so its unique i.e. rename the copy-service validator -> copy-validator and archive-service validator -> archive-validator. Why can’t gradle use the full name when resolving the project instead of only the final suffix?