Skip to content

Commit eb6a0cd

Browse files
committed
Consolidate POM config
1 parent 405e21a commit eb6a0cd

File tree

1 file changed

+27
-43
lines changed

1 file changed

+27
-43
lines changed

Parse/build.gradle

Lines changed: 27 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,30 @@ def isSnapshot = version.endsWith('-SNAPSHOT')
123123
def ossrhUsername = hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : System.getenv('CI_NEXUS_USERNAME')
124124
def ossrhPassword = hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : System.getenv('CI_NEXUS_PASSWORD')
125125

126+
def pomConfig = {
127+
licenses {
128+
license {
129+
name 'BSD License'
130+
url 'https://github.com/parse-community/Parse-SDK-Android/blob/master/LICENSE'
131+
distribution 'repo'
132+
}
133+
}
134+
135+
scm {
136+
connection 'scm:[email protected]:parse-community/Parse-SDK-Android.git'
137+
developerConnection 'scm:[email protected]:parse-community/Parse-SDK-Android.git'
138+
url gitLink
139+
}
140+
141+
developers {
142+
developer {
143+
id 'parse'
144+
name 'Parse'
145+
}
146+
}
147+
}
148+
149+
126150
uploadArchives {
127151
repositories.mavenDeployer {
128152
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
@@ -135,34 +159,15 @@ uploadArchives {
135159
authentication(userName: ossrhUsername, password: ossrhPassword)
136160
}
137161

138-
pom.project {
162+
def basePom = {
139163
name projName
140164
artifactId = artifact
141165
packaging 'aar'
142166
description projDescription
143167
url gitLink
144-
145-
scm {
146-
connection 'scm:[email protected]:parse-community/Parse-SDK-Android.git'
147-
developerConnection 'scm:[email protected]:parse-community/Parse-SDK-Android.git'
148-
url 'https://github.com/parse-community/Parse-SDK-Android'
149-
}
150-
151-
licenses {
152-
license {
153-
name 'BSD License'
154-
url 'https://github.com/parse-community/Parse-SDK-Android/blob/master/LICENSE'
155-
distribution 'repo'
156-
}
157-
}
158-
159-
developers {
160-
developer {
161-
id 'parse'
162-
name 'Parse'
163-
}
164-
}
165168
}
169+
170+
pom.project basePom << pomConfig
166171
}
167172
}
168173

@@ -256,27 +261,6 @@ bintray {
256261
}
257262
}
258263

259-
def pomConfig = {
260-
licenses {
261-
license {
262-
name 'BSD License'
263-
url 'https://github.com/parse-community/Parse-SDK-Android/blob/master/LICENSE'
264-
distribution 'repo'
265-
}
266-
}
267-
268-
scm {
269-
url gitLink
270-
}
271-
272-
developers {
273-
developer {
274-
id 'parse'
275-
name 'Parse'
276-
}
277-
}
278-
}
279-
280264
// Create the publication with the pom configuration:
281265
apply plugin: 'maven-publish'
282266

0 commit comments

Comments
 (0)