Unique snapshot version strings with How can publish artifacts with a unique version string to a local maven repository using the 'maven-publish' plugin?-publish and publishToMavenLocal

I migrated from the ‘maven’ to the ‘maven-publish’ plugin. While using the ‘maven’ plugin, I had configured a task called uploadLocal which would publish into a local maven repository with unique version strings:

	// Does install unique snapshosts (and release)s in the local maven
	// repository, unlike the 'install' task.
	// You can specify the path of the local maven repository using 'maven.repo.local', e.g.
	// gradle uploadLocal -Dmaven.repo.local=/var/www/repo
	task uploadLocal(type: Upload) {
		description "Uploads artifacts into the local maven repository URL."
		configuration = configurations['archives']
		repositories {
			mavenDeployer {
				repository url: repositories.mavenLocal().url
			}
		}
	}

It appears that the ‘maven-publish’ plugin only creates unique snapshot version when publishing to a remote maven repostiory and not to a local one (publishToMavenLocal).

How can publish artifacts with a unique version string to a local maven repository using the ‘maven-publish’ plugin?

Eventually this ticket helps: https://issues.gradle.org/browse/GRADLE-2762