Publishing artifacts
Building a software does not make much sense unless you publish your software to some common repositories so that, if needed, it can be reused by other software or projects. We have discussed the repositories while downloading the dependencies. The other aspect of repositories is uploading the build outcome (JAR, WAR, EAR, and so on) to some common location so that it could be downloaded by other developers. The different plugins in Gradle provide an automated way to publish the default artifacts of the plugin. For example, a java
plugin provides a task to upload a JAR file, a war
plugin provides a task to upload a WAR file, a scala
plugin provides a task to upload a JAR file, and so on. A user just needs to configure the upload repository location. If a user does not want to upload the default build artifact or a user wants to upload some custom artifacts, he can easily customize Gradle tasks to upload the other artifacts and also as per his custom requirements.
As we...