I am new to gradle and Following the tutorial https://docs.gradle.org/current/userguide/multi_project_builds.html#sec:project_jar_dependencies
This layout perfectly fit my need but now. I am adding dependencies to my project i am wondering what’is the best way to do it because i am duplicating some lines….
Let’s take the same tutorial project
java/ settings.gradle build.gradle api/ src/main/java/ org/gradle/sample/ api/ Person.java apiImpl/ PersonImpl.java services/personService/ src/ main/java/ org/gradle/sample/services/ PersonService.java test/java/ org/gradle/sample/services/ PersonServiceTest.java shared/ src/main/java/ org/gradle/sample/shared/ Helper.java
Now I have some dependencies in common (for example the lib “apache-commons”) used by shared and services but not by api.
How could I handle such dependencies I can add it to the root project but I prefer to have project that doesn’t depend on useless librarie.
Remarks : there is more than apache-commons, and some other Library can be common to api and service but not shared