A library where version 1 contains a class, and version 2 deletes that class and contains a different class.
An app which depends on both version 1 and version 2 of the library.
Building the app from the command line fails.
- Clone or download this git repository to a machine which has:
- Bash shell (tested on Mac with 3.2.57(1))
- IntelliJ installed (tested with 2019.1)
- Gradle and Java (tested with Gradle 5.4 and Java 11.0.2) available on the commmand line e.g. by including them on the PATH.
- Network connection (for dependencies on external artifacts)
- Open a terminal in the downloaded repo directory.
- Run
./mess_with_dependencies
- Follow instructions on the command line.
IntelliJ highlights the potential problems in the Gradle source sets having two versions of the same library, and underlines in red the lines which would fail to build.
No IntelliJ IDE highlighted error in the app tests, and tests pass.
- Open a terminal in the downloaded repo directory.
- Run
./cleanup