Skip to content

Instantly share code, notes, and snippets.

@SemonCat
Created June 30, 2016 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SemonCat/82e6b800ef2d902a087d2b14e33508e3 to your computer and use it in GitHub Desktop.
Save SemonCat/82e6b800ef2d902a087d2b14e33508e3 to your computer and use it in GitHub Desktop.
lib
publishing {
publications {
aar(MavenPublication) {
groupId packageName
version = libraryVersion
artifactId "robotrtcsdk"
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
pom.withXml {
def dependencies = asNode().appendNode('dependencies')
configurations.getByName("_releaseCompile").getResolvedConfiguration().getFirstLevelModuleDependencies().each {
def dependency = dependencies.appendNode('dependency')
dependency.appendNode('groupId', it.moduleGroup)
dependency.appendNode('artifactId', it.moduleName)
dependency.appendNode('version', it.moduleVersion)
}
}
}
}
}
artifactory {
contextUrl = 'http://xx.xx.xx.xx:8080/artifactory'
publish {
repository {
// The Artifactory repository key to publish to
repoKey = 'libs-release-local'
username = "deployer"
password = "xxxxxxxxxxxxxxxx"
}
defaults {
// Tell the Artifactory Plugin which artifacts should be published to Artifactory.
publications('aar')
publishArtifacts = true
// Properties to be attached to the published artifacts.
properties = ['qa.level': 'basic', 'dev.team': 'core']
// Publish generated POM files to Artifactory (true by default)
publishPom = true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment