I have a project with the following structure:
parent
> core
> module-1 (with dependencies: A, B)
> module-2 (with dependencies: X, Y)
> project
module-1
and module-2
provide the same functionality (data access) in different environments.
Module project
depends on core
, and either module-1
or module-2
.
Problem: If I make project
dependent on both module-1
and module-2
, there are a lot of unnecessary transitive dependencies (e.g. I don't need X or Y when deploying to enviroment #1, because only module-1
is used there).
I would like to fail the build as early as possible if both module-1
and module-2
are specified as dependencies of project
.
I wrote a test that looks for each module, and fails if both are found, but I think there should be an easier / more direct way to do that that.