Revision control

Copy as Markdown

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
def libLicense = properties.libLicense
def libLicenseUrl = properties.libLicenseUrl
def libRepositoryName = properties.libRepositoryName
def libProjectName = properties.libProjectName
def libUrl = properties.libUrl
def libVcsUrl = properties.libVcsUrl
// The note to be added at the end of the description for 'forUnitTests'
// artifacts.
def forUnitTestDescriptionSuffix =
"This artifact is to be used for running unit tests on developer's systems."
ext.configurePublish = {
def theGroupId = rootProject.ext.library.groupId
def theArtifactId = project.ext.artifactId
def theDescription = project.ext.description
publishing {
publications {
aar(MavenPublication) {
project.afterEvaluate {
from components.release
}
// If this goes haywire with
// 'Cannot configure the 'publishing' extension after it has been accessed.',
pom {
groupId = theGroupId
artifactId = theArtifactId
description = theDescription
// For mavenLocal publishing workflow, increment the version number every publish.
version = rootProject.ext.library.version + (rootProject.hasProperty('local') ? '-' + rootProject.property('local') : '')
packaging = "aar"
licenses {
license {
name = libLicense
url = libLicenseUrl
}
}
def depLicenses = new XmlSlurper().parse(new File("${projectDir}/dependency-licenses.xml"))
depLicenses.license.each { node ->
license {
name = node.name.text()
url = node.url.text()
}
}
developers {
developer {
name = 'Mozilla Glean Team'
email = 'glean-team@mozilla.com'
}
}
scm {
connection = libVcsUrl
developerConnection = libVcsUrl
url = libUrl
}
}
}
}
}
task checkMavenArtifacts
}