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/v7/gridlayout/build.gradle b/v7/gridlayout/build.gradle
index 7ef9e5e..f007373 100644
--- a/v7/gridlayout/build.gradle
+++ b/v7/gridlayout/build.gradle
@@ -29,36 +29,17 @@
     }
 }
 
+supportLibrary {
+    name 'Android Support Grid Layout'
+    inceptionYear '2013'
+    description 'Android Support Grid Layout'
+}
+
 uploadArchives {
     repositories {
         mavenDeployer {
             repository(url: uri(rootProject.ext.supportRepoOut)) {
             }
-
-            pom.project {
-                name 'Android Support Library v4'
-                description "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 4 or later."
-                url 'http://developer.android.com/tools/extras/support-library.html'
-                inceptionYear '2011'
-
-                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'
-                    }
-                }
-            }
         }
     }
 }