Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] Como "empacotar" no aar as dependências da library

Estou utilizando no gradle os plugins maven e maven-publish. Segue abaixo minha task

publishing {
publications {
maven(MavenPublication) {
artifact "${project.buildDir}/outputs/aar/${project.name}-release.aar"
groupId 'MEU PACOTE'
artifactId 'cameralib'
version '1.0.10'

pom.withXml {
def depsNode = asNode().appendNode('dependencies')

configurations.compile.allDependencies.each { dep ->
if(dep.name != null && dep.group != null && dep.version != null) {
def depNode = depsNode.appendNode('dependency')
depNode.appendNode('groupId', dep.group)
depNode.appendNode('artifactId', dep.name)
depNode.appendNode('version', dep.version)
depNode.appendNode('scope', 'provided')
//optional add scope
//optional add transitive exclusions
}
}
}
}

repositories.maven {
url 'http://10.62.38.88:8081/nexus/content/repositories/releases/'
credentials {
username "admin"
password "SENHANEXUS"
}
}
}
}

2 - O pom gerado é esse:

<dependency>
  <groupId>br.maximasist</groupId>
  <artifactId>cameralib</artifactId>
  <version>1.0.10</version>
  <type>pom</type>
</dependency>

3 - Como adicionar as dependências no POM?

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário