Apache Maven enables developers to augment repository URL via
That might sound powerful, however, it requires to use the same repository IDs across all the projects which might not be always possible.
Let's see how Gradle-based project can be published to a custom repository.
For instance, let's try to publish Apache Calcite to our own Nexus instance.
Of course we don't want to commit the URL and password of our
secretNexus to GitHub, so we need to augment the build without touching the files.
Gradle has Initialization Scripts that enable users to augment all the builds without touching project-specific files.