I am working on a project that is currently using Ant. Our project does not have a ‘root’ project, in that there are several different client and server processes that could be created depending on where you built from, and building from the root directory just builds ‘everything’.
Our setup enables us to ‘cd’ to a directory and just call ‘ant build’ and it determines the proper project dependencies and builds them as necessary. I was curious if Gradle would fit in to our project, just out of curiosity. After reading the documentation, I am having a hard time wrapping my head around the multi-project setup and whether or not I could use it similar to how we are now with Ant.
If we had a directory/project setup like the following, would gradle allow me to ‘cd’ to something like ‘serverProject2’ and do a ‘gradle build’ and have it build javaSharedLibraryProject1, javaLibraryProject1, and serverProject2 if it depended on them? It almost seemed possible with some manipulation of a settings.gradle in the root directory, but I’d like to avoid needing to keep track of projects in a file if at all possible.
root
- projects
-
shared
- javaSharedLibraryProject1
- javaSharedLibraryProject2
-
application
- server
- serverProject1
- serverProject2
- client
- clientProject1
- clientProject2
- lib
- javaLibraryProject1
- javaLibraryProject2