Fix createArchive task.

After ag/2232393 the uploadTask was no longer deleting maven-metadata.xml
due to me incorrectly setting up when to run it.

Bug: 38177084
Test: ./gradlew createArchive, verify that maven-metadata.xml is in fact not there.
Change-Id: I849dc45241b9378e9590cdcf2baacfd2fbae3717
diff --git a/buildSrc/init.gradle b/buildSrc/init.gradle
index c56953f..5c61cc2 100644
--- a/buildSrc/init.gradle
+++ b/buildSrc/init.gradle
@@ -222,10 +222,11 @@
                     uploadTask.repositories.mavenDeployer {
                         // Disable unique names for SNAPSHOTS so they can be updated in place.
                         setUniqueVersion(false)
-
+                    }
+                    uploadTask.doLast {
                         // Remove any invalid maven-metadata.xml files that may have been
                         // created for SNAPSHOT versions that are *not* uniquely versioned.
-                        pom*.each { pom ->
+                        repositories.mavenDeployer.pom*.each { pom ->
                             if (pom.version.endsWith('-SNAPSHOT')) {
                                 final File artifactDir = new File(
                                         rootProject.ext.supportRepoOut,