Provided your build script contains the single line
Executing gradle libs will compile, test and jar your code. If you specify a remote repository, executing gradle uploadLibs will do additionally an upload of your jar to a remote repository. Builds have usually more requirements. Let’s look at a typical multi-project build.
We have three projects. api is shipped to the client to provide them a Java client for your XML webservice. webservice is a webapp which returns XML. shared is code used both by api and webservice. Let’s look at the Gradle build scripts of those projects.
The commons stuff for all Java projects we do define in the root project. Not by inheritance but via Configuration Injection. The root project is like a container and subprojects iterates over the elements of this container and injects the specified configuration. This way we can easily define the manifest content for all archives.
In the api build script we add further dependencies. One dependency are the jars of the shared project. Due to this dependency shared gets now always build before api. We also add a distribution, that gets shipped to the client.