Move the set up of uploadArchives to SupportLibraryPlugin

This is the third CL in the series of cleaning up build.gradle files
in support library. There are the following changes in this CL:
- Add SupportLibraryExtension to allow passing data from build.gradle files
  to the plugin.
- Move SupportLibraryPlugin from Java to Groovy, this was needed due to
  org.apache.maven.model.Model being inaccessible from Java.
- Update inception years for some of the modules.

Test: ./gradle uploadArchives still writes out correct pom xml files
Bug: 33845666
Change-Id: Ifa617ad16c4784a37b046ada6584fef2054cbd16
diff --git a/wearable/build.gradle b/wearable/build.gradle
index b7d0751..e680623 100644
--- a/wearable/build.gradle
+++ b/wearable/build.gradle
@@ -37,36 +37,17 @@
     }
 }
 
+supportLibrary {
+    name 'Android Wear Support UI'
+    inceptionYear '2016'
+    description 'Android Wear Support UI'
+}
+
 uploadArchives {
     repositories {
         mavenDeployer {
             repository(url: uri(rootProject.ext.supportRepoOut)) {
             }
-
-            pom.project {
-                name 'Android Wear Support UI'
-                description "Android Wear Support UI"
-                url 'http://developer.android.com/tools/extras/support-library.html'
-                inceptionYear '2016'
-
-                licenses {
-                    license {
-                        name 'The Apache Software License, Version 2.0'
-                        url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
-                        distribution 'repo'
-                    }
-                }
-
-                scm {
-                    url "http://source.android.com"
-                    connection "scm:git:https://android.googlesource.com/platform/frameworks/support"
-                }
-                developers {
-                    developer {
-                        name 'The Android Open Source Project'
-                    }
-                }
-            }
         }
     }
 }