Skip to content

Commit 0e1975c

Browse files
committed
Complete POM for Maven Central
Change-Id: I3764295aad6c7c96370564db137fcd1372906638
1 parent e5cd5ee commit 0e1975c

File tree

2 files changed

+57
-2
lines changed

2 files changed

+57
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ To deploy FirebaseUI to Bintray
6666

6767
1. Set `BINTRAY_USER` and `BINTRAY_KEY` in your environment. You must
6868
be a member of the firebaseui Bintray organization.
69-
1. Run `./gradlew :library:prepareArtifacts :library:bintrayUploadAll`
70-
1. Go to the Bintray dashboard and click 'Publish'
69+
1. Run `./gradlew clean :library:prepareArtifacts :library:bintrayUploadAll`
70+
1. Go to the Bintray dashboard and click 'Publish'.
71+
1. In Bintray click the 'Maven Central' tab and publish the release.
7172

7273
### Tag a release on Github
7374

build.gradle

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)