@@ -108,6 +108,60 @@ allprojects { project ->
108108 }
109109 }
110110
111+ // POM to meet maven specs
112+ if (isLibrary || isSubmodule) {
113+ def targetName = isLibrary ? ' monolithLibrary' : " ${ project.name} Library"
114+
115+ publishing {
116+ publications {
117+ " ${ targetName} " (MavenPublication ) {
118+ pom. withXml {
119+ // Common values
120+ def repoUrl = ' https://github.com/firebase/FirebaseUI-Android'
121+ def scmUrl = ' scm:git:git@github.com/firebase/firebaseui-android.git'
122+
123+ // Name
124+ asNode(). appendNode(' name' , artifactId)
125+
126+ // Description
127+ asNode(). appendNode(' description' , ' Firebase UI for Android' )
128+
129+ // Organization
130+ def organization = asNode(). appendNode(' organization' )
131+ organization. appendNode(' name' , ' FirebaseUI' )
132+ organization. appendNode(' url' , repoUrl)
133+
134+ // URL
135+ asNode(). appendNode(' url' , repoUrl)
136+
137+ // SCM
138+ def scm = asNode(). appendNode(' scm' )
139+ scm. appendNode(' connection' , scmUrl)
140+ scm. appendNode(' developerConnection' , scmUrl)
141+ scm. appendNode(' url' , repoUrl)
142+ scm. appendNode(' tag' , ' HEAD' )
143+
144+ // Developers
145+ def developer = asNode(). appendNode(' developers' ). appendNode(' developer' )
146+ developer. appendNode(' id' , ' samtstern' )
147+ developer. appendNode(' email' , ' samstern@google.com' )
148+ developer. appendNode(' organization' , ' Firebase' )
149+ developer. appendNode(' organizationUrl' , ' https://firebase.google.com' )
150+ def roles = developer. appendNode(' roles' )
151+ roles. appendNode(' role' , ' Project-Administrator' )
152+ roles. appendNode(' role' , ' Developer' )
153+ developer. appendNode(' timezone' , ' -8' )
154+
155+ // Licenses
156+ def license = asNode(). appendNode(' licenses' ). appendNode(' license' )
157+ license. appendNode(' name' , ' The Apache License, Version 2.0' )
158+ license. appendNode(' url' , ' http://www.apache.org/licenses/LICENSE-2.0.txt' )
159+ }
160+ }
161+ }
162+ }
163+ }
164+
111165 if (isSubmodule) {
112166 // Convenience task to prepare everything we need for releases
113167 task prepareArtifacts(dependsOn : [javadocJar, sourcesJar, assembleRelease, pomTask]) {}
0 commit comments