Gradle version bump and POM details
Summary: This improves the quality of the published POM files, adding dependencies and marking the object as an 'aar'. It also bumps the version to 1.2.0 for JCenter. Reviewed By: emilsjolander Differential Revision: D4620150 fbshipit-source-id: 968f1cea21af4b2f19aeff3f32ad575b185fa1bb
This commit is contained in:
committed by
Facebook Github Bot
parent
5bc0197c78
commit
abf912b729
@@ -41,15 +41,26 @@ def pomConfig = {
|
||||
publishing {
|
||||
publications {
|
||||
primaryPublication(MavenPublication) {
|
||||
groupId group
|
||||
artifact(sourcesJar)
|
||||
artifact(javadocJar)
|
||||
pom.withXml {
|
||||
def root = asNode()
|
||||
root.appendNode('name', 'Yoga')
|
||||
root.appendNode('url', siteURL)
|
||||
root.children().last() + pomConfig
|
||||
}
|
||||
groupId group
|
||||
artifact(sourcesJar)
|
||||
artifact(javadocJar)
|
||||
pom.packaging='aar'
|
||||
pom.withXml {
|
||||
def root = asNode()
|
||||
root.appendNode('name', 'Yoga')
|
||||
root.appendNode('url', siteURL)
|
||||
root.children().last() + pomConfig
|
||||
def dependenciesNode = root.appendNode('dependencies')
|
||||
//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
|
||||
configurations.compile.allDependencies.each {
|
||||
if(it.group != null && (it.name != null || "unspecified".equals(it.name)) && it.version != null) {
|
||||
def dependencyNode = dependenciesNode.appendNode('dependency')
|
||||
dependencyNode.appendNode('groupId', it.group)
|
||||
dependencyNode.appendNode('artifactId', it.name)
|
||||
dependencyNode.appendNode('version', it.version)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user