Maven-publish uploads artifacts twice

Our projects use a common gradle file to apply and configure the maven-publish plugin. In the shared file, the only thing that is defined is the repositories block. This file then becomes a dependency of another project and the common gradle file is applied in build.gradle.

Later on in the build.gradle file the publishing block is written to specify which artifacts should be published to the repository. This causes the artifacts to be uploaded twice. When removing the common gradle script and adding its contents to the build.gradle file the duplicate upload no longer occurs.