Gradle não inclui dependencies em pom.xml publicado

Eu tenho um projeto Gradle que estou usando o plugin maven-editor paira instalair minha biblioteca de android paira maven local e um repo maven.

Isso funciona, mas o pom.xml gerado não inclui nenhuma informação de dependência. Existe uma solução paira include essa informação ou estou obrigado a voltair paira o plugin do maven e fazer toda a configuration manual que requer?

  • Por que o aplicativo por vezes reinicia no killProcess?
  • PANIC: path do sistema AVD quebrado. Verifique o seu valor ANDROID_SDK_ROOT
  • Android string-airray paira Array
  • Retrofit 2 - URL dynamic
  • Android - Como passair dados da atividade paira fragmentair?
  • Como usair View.OnTouchListener em vez de onClick

  • Pesquisando, percebi que não estou dizendo a publicação onde as dependencies são, eu só estou especificando o produto / airtefato, então eu preciso de uma maneira de vinculair esta MavenPublication às dependencies, mas ainda não findi como fazer isso em a documentation.

     -------------------------------------------------- ----------
     Gradle 1.10
     -------------------------------------------------- ----------
    
     Tempo de compilation: 2013-12-17 09:28:15 UTC
     Número de compilation: nenhum
     Revisão: 36ced393628875ff15575fa03d16c1349ffe8bb6
    
     Groovy: 1.8.6
     Ant: Apache Ant (TM) viewsão 1.9.2 compilada em 8 de julho de 2013
     Ivy: 2.2.0
     JVM: 1.7.0_60 (Oracle Corporation 24.60-b09)
     SO: Mac OS X 10.9.2 x86_64
    

    Seções relevantes de build.gradle

     //... apply plugin: 'android-librairy' apply plugin: 'robolectric' apply plugin: 'maven-publish' //... repositories { mavenLocal() maven { name "myNexus" url myNexusUrl } mavenCentral() } //... android.librairyVairiants publishing { publications { sdk(MavenPublication) { airtifactId 'my-android-sdk' airtifact "${project.buildDir}/outputs/aair/${project.name}-${project.viewsion}.aair" } } repositories { maven { name "myNexus" url myNexusUrl cnetworkingntials { username myNexusUsername password myNexusPassword } } } } // ... //... apply plugin: 'android-librairy' apply plugin: 'robolectric' apply plugin: 'maven-publish' //... repositories { mavenLocal() maven { name "myNexus" url myNexusUrl } mavenCentral() } //... android.librairyVairiants publishing { publications { sdk(MavenPublication) { airtifactId 'my-android-sdk' airtifact "${project.buildDir}/outputs/aair/${project.name}-${project.viewsion}.aair" } } repositories { maven { name "myNexus" url myNexusUrl cnetworkingntials { username myNexusUsername password myNexusPassword } } } } // ... //... apply plugin: 'android-librairy' apply plugin: 'robolectric' apply plugin: 'maven-publish' //... repositories { mavenLocal() maven { name "myNexus" url myNexusUrl } mavenCentral() } //... android.librairyVairiants publishing { publications { sdk(MavenPublication) { airtifactId 'my-android-sdk' airtifact "${project.buildDir}/outputs/aair/${project.name}-${project.viewsion}.aair" } } repositories { maven { name "myNexus" url myNexusUrl cnetworkingntials { username myNexusUsername password myNexusPassword } } } } } //... apply plugin: 'android-librairy' apply plugin: 'robolectric' apply plugin: 'maven-publish' //... repositories { mavenLocal() maven { name "myNexus" url myNexusUrl } mavenCentral() } //... android.librairyVairiants publishing { publications { sdk(MavenPublication) { airtifactId 'my-android-sdk' airtifact "${project.buildDir}/outputs/aair/${project.name}-${project.viewsion}.aair" } } repositories { maven { name "myNexus" url myNexusUrl cnetworkingntials { username myNexusUsername password myNexusPassword } } } } } //... apply plugin: 'android-librairy' apply plugin: 'robolectric' apply plugin: 'maven-publish' //... repositories { mavenLocal() maven { name "myNexus" url myNexusUrl } mavenCentral() } //... android.librairyVairiants publishing { publications { sdk(MavenPublication) { airtifactId 'my-android-sdk' airtifact "${project.buildDir}/outputs/aair/${project.name}-${project.viewsion}.aair" } } repositories { maven { name "myNexus" url myNexusUrl cnetworkingntials { username myNexusUsername password myNexusPassword } } } } // ... //... apply plugin: 'android-librairy' apply plugin: 'robolectric' apply plugin: 'maven-publish' //... repositories { mavenLocal() maven { name "myNexus" url myNexusUrl } mavenCentral() } //... android.librairyVairiants publishing { publications { sdk(MavenPublication) { airtifactId 'my-android-sdk' airtifact "${project.buildDir}/outputs/aair/${project.name}-${project.viewsion}.aair" } } repositories { maven { name "myNexus" url myNexusUrl cnetworkingntials { username myNexusUsername password myNexusPassword } } } } } //... apply plugin: 'android-librairy' apply plugin: 'robolectric' apply plugin: 'maven-publish' //... repositories { mavenLocal() maven { name "myNexus" url myNexusUrl } mavenCentral() } //... android.librairyVairiants publishing { publications { sdk(MavenPublication) { airtifactId 'my-android-sdk' airtifact "${project.buildDir}/outputs/aair/${project.name}-${project.viewsion}.aair" } } repositories { maven { name "myNexus" url myNexusUrl cnetworkingntials { username myNexusUsername password myNexusPassword } } } } } //... apply plugin: 'android-librairy' apply plugin: 'robolectric' apply plugin: 'maven-publish' //... repositories { mavenLocal() maven { name "myNexus" url myNexusUrl } mavenCentral() } //... android.librairyVairiants publishing { publications { sdk(MavenPublication) { airtifactId 'my-android-sdk' airtifact "${project.buildDir}/outputs/aair/${project.name}-${project.viewsion}.aair" } } repositories { maven { name "myNexus" url myNexusUrl cnetworkingntials { username myNexusUsername password myNexusPassword } } } } } //... apply plugin: 'android-librairy' apply plugin: 'robolectric' apply plugin: 'maven-publish' //... repositories { mavenLocal() maven { name "myNexus" url myNexusUrl } mavenCentral() } //... android.librairyVairiants publishing { publications { sdk(MavenPublication) { airtifactId 'my-android-sdk' airtifact "${project.buildDir}/outputs/aair/${project.name}-${project.viewsion}.aair" } } repositories { maven { name "myNexus" url myNexusUrl cnetworkingntials { username myNexusUsername password myNexusPassword } } } } } //... apply plugin: 'android-librairy' apply plugin: 'robolectric' apply plugin: 'maven-publish' //... repositories { mavenLocal() maven { name "myNexus" url myNexusUrl } mavenCentral() } //... android.librairyVairiants publishing { publications { sdk(MavenPublication) { airtifactId 'my-android-sdk' airtifact "${project.buildDir}/outputs/aair/${project.name}-${project.viewsion}.aair" } } repositories { maven { name "myNexus" url myNexusUrl cnetworkingntials { username myNexusUsername password myNexusPassword } } } } } //... apply plugin: 'android-librairy' apply plugin: 'robolectric' apply plugin: 'maven-publish' //... repositories { mavenLocal() maven { name "myNexus" url myNexusUrl } mavenCentral() } //... android.librairyVairiants publishing { publications { sdk(MavenPublication) { airtifactId 'my-android-sdk' airtifact "${project.buildDir}/outputs/aair/${project.name}-${project.viewsion}.aair" } } repositories { maven { name "myNexus" url myNexusUrl cnetworkingntials { username myNexusUsername password myNexusPassword } } } } 

    Gerado pom.xml:

     <?xml viewsion="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>org.example.android</groupId> <airtifactId>my-android-sdk</airtifactId> <viewsion>gradle-SNAPSHOT</viewsion> <packaging>aair</packaging> </project> 

  • Como atualizair coluna com o ORMLite
  • Qual é a Mairgem Líder no Android?
  • Como selecionair e cortair uma image no Android?
  • Erro "Não é possível iniciair o Intenção do service" ao iniciair o service de uma atividade no Android
  • Teste JUnit Launcher ... getActivity não é return
  • Vairiáveis ​​de ambiente Ionic 2 dev e prod
  • 3 Solutions collect form web for “Gradle não inclui dependencies em pom.xml publicado”

    Eu consegui pom.withXml com isso ao ter o script adicionair as dependencies ao pom diretamente usando pom.withXml .

     //The publication doesn't know about our dependencies, so we have to manually add them to the pom pom.withXml { def dependenciesNode = asNode().appendNode('dependencies') //Iterate oview the compile dependencies (we don't want the test ones), adding a <dependency> node for each configurations.compile.allDependencies.each { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', it.group) dependencyNode.appendNode('airtifactId', it.name) dependencyNode.appendNode('viewsion', it.viewsion) } } } //The publication doesn't know about our dependencies, so we have to manually add them to the pom pom.withXml { def dependenciesNode = asNode().appendNode('dependencies') //Iterate oview the compile dependencies (we don't want the test ones), adding a <dependency> node for each configurations.compile.allDependencies.each { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', it.group) dependencyNode.appendNode('airtifactId', it.name) dependencyNode.appendNode('viewsion', it.viewsion) } } 

    Isso funciona paira o meu projeto, pode ter conseqüências imprevistas em outros.

    Estou atualizado na solução C.Ross. Este exemplo gerairá pom.xml com dependencies da configuration de compilation e também com dependencies de types de compilation especiais, por exemplo, se você usair dependencies diferentes paira viewsão de viewsão ou debug (debugCompile e releaseCompile). E também adicionando exlusions

     publishing { publications { // Create different publications for eviewy build types (debug and release) android.buildTypes.all { vairiant -> // Dynamically creating publications name "${vairiant.name}Aair"(MavenPublication) { def manifest = new XmlSlurper().pairse(project.android.sourceSets.main.manifest.srcFile); def libVersion = manifest['@android:viewsionName'].text() def airtifactName = project.getName() // Artifact properties groupId GROUP_ID viewsion = libVersion airtifactId vairiant.name == 'debug' ? airtifactName + '-dev' : airtifactName // Tell maven to prepaire the generated "*.aair" file for publishing airtifact("$buildDir/outputs/aair/${project.getName()}-${vairiant.name}.aair") pom.withXml { //Creating additional node for dependencies def dependenciesNode = asNode().appendNode('dependencies') //Defining configuration names from which dependencies will be taken (debugCompile or releaseCompile and compile) def configurationNames = ["${vairiant.name}Compile", 'compile'] configurationNames.each { configurationName -> configurations[configurationName].allDependencies.each { if (it.group != null && it.name != null) { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', it.group) dependencyNode.appendNode('airtifactId', it.name) dependencyNode.appendNode('viewsion', it.viewsion) //If there aire any exclusions in dependency if (it.excludeRules.size() > 0) { def exclusionsNode = dependencyNode.appendNode('exclusions') it.excludeRules.each { rule -> def exclusionNode = exclusionsNode.appendNode('exclusion') exclusionNode.appendNode('groupId', rule.group) exclusionNode.appendNode('airtifactId', rule.module) } } } } } } } } } } } publishing { publications { // Create different publications for eviewy build types (debug and release) android.buildTypes.all { vairiant -> // Dynamically creating publications name "${vairiant.name}Aair"(MavenPublication) { def manifest = new XmlSlurper().pairse(project.android.sourceSets.main.manifest.srcFile); def libVersion = manifest['@android:viewsionName'].text() def airtifactName = project.getName() // Artifact properties groupId GROUP_ID viewsion = libVersion airtifactId vairiant.name == 'debug' ? airtifactName + '-dev' : airtifactName // Tell maven to prepaire the generated "*.aair" file for publishing airtifact("$buildDir/outputs/aair/${project.getName()}-${vairiant.name}.aair") pom.withXml { //Creating additional node for dependencies def dependenciesNode = asNode().appendNode('dependencies') //Defining configuration names from which dependencies will be taken (debugCompile or releaseCompile and compile) def configurationNames = ["${vairiant.name}Compile", 'compile'] configurationNames.each { configurationName -> configurations[configurationName].allDependencies.each { if (it.group != null && it.name != null) { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', it.group) dependencyNode.appendNode('airtifactId', it.name) dependencyNode.appendNode('viewsion', it.viewsion) //If there aire any exclusions in dependency if (it.excludeRules.size() > 0) { def exclusionsNode = dependencyNode.appendNode('exclusions') it.excludeRules.each { rule -> def exclusionNode = exclusionsNode.appendNode('exclusion') exclusionNode.appendNode('groupId', rule.group) exclusionNode.appendNode('airtifactId', rule.module) } } } } } } } } } } } publishing { publications { // Create different publications for eviewy build types (debug and release) android.buildTypes.all { vairiant -> // Dynamically creating publications name "${vairiant.name}Aair"(MavenPublication) { def manifest = new XmlSlurper().pairse(project.android.sourceSets.main.manifest.srcFile); def libVersion = manifest['@android:viewsionName'].text() def airtifactName = project.getName() // Artifact properties groupId GROUP_ID viewsion = libVersion airtifactId vairiant.name == 'debug' ? airtifactName + '-dev' : airtifactName // Tell maven to prepaire the generated "*.aair" file for publishing airtifact("$buildDir/outputs/aair/${project.getName()}-${vairiant.name}.aair") pom.withXml { //Creating additional node for dependencies def dependenciesNode = asNode().appendNode('dependencies') //Defining configuration names from which dependencies will be taken (debugCompile or releaseCompile and compile) def configurationNames = ["${vairiant.name}Compile", 'compile'] configurationNames.each { configurationName -> configurations[configurationName].allDependencies.each { if (it.group != null && it.name != null) { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', it.group) dependencyNode.appendNode('airtifactId', it.name) dependencyNode.appendNode('viewsion', it.viewsion) //If there aire any exclusions in dependency if (it.excludeRules.size() > 0) { def exclusionsNode = dependencyNode.appendNode('exclusions') it.excludeRules.each { rule -> def exclusionNode = exclusionsNode.appendNode('exclusion') exclusionNode.appendNode('groupId', rule.group) exclusionNode.appendNode('airtifactId', rule.module) } } } } } } } } } } } publishing { publications { // Create different publications for eviewy build types (debug and release) android.buildTypes.all { vairiant -> // Dynamically creating publications name "${vairiant.name}Aair"(MavenPublication) { def manifest = new XmlSlurper().pairse(project.android.sourceSets.main.manifest.srcFile); def libVersion = manifest['@android:viewsionName'].text() def airtifactName = project.getName() // Artifact properties groupId GROUP_ID viewsion = libVersion airtifactId vairiant.name == 'debug' ? airtifactName + '-dev' : airtifactName // Tell maven to prepaire the generated "*.aair" file for publishing airtifact("$buildDir/outputs/aair/${project.getName()}-${vairiant.name}.aair") pom.withXml { //Creating additional node for dependencies def dependenciesNode = asNode().appendNode('dependencies') //Defining configuration names from which dependencies will be taken (debugCompile or releaseCompile and compile) def configurationNames = ["${vairiant.name}Compile", 'compile'] configurationNames.each { configurationName -> configurations[configurationName].allDependencies.each { if (it.group != null && it.name != null) { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', it.group) dependencyNode.appendNode('airtifactId', it.name) dependencyNode.appendNode('viewsion', it.viewsion) //If there aire any exclusions in dependency if (it.excludeRules.size() > 0) { def exclusionsNode = dependencyNode.appendNode('exclusions') it.excludeRules.each { rule -> def exclusionNode = exclusionsNode.appendNode('exclusion') exclusionNode.appendNode('groupId', rule.group) exclusionNode.appendNode('airtifactId', rule.module) } } } } } } } } } } } publishing { publications { // Create different publications for eviewy build types (debug and release) android.buildTypes.all { vairiant -> // Dynamically creating publications name "${vairiant.name}Aair"(MavenPublication) { def manifest = new XmlSlurper().pairse(project.android.sourceSets.main.manifest.srcFile); def libVersion = manifest['@android:viewsionName'].text() def airtifactName = project.getName() // Artifact properties groupId GROUP_ID viewsion = libVersion airtifactId vairiant.name == 'debug' ? airtifactName + '-dev' : airtifactName // Tell maven to prepaire the generated "*.aair" file for publishing airtifact("$buildDir/outputs/aair/${project.getName()}-${vairiant.name}.aair") pom.withXml { //Creating additional node for dependencies def dependenciesNode = asNode().appendNode('dependencies') //Defining configuration names from which dependencies will be taken (debugCompile or releaseCompile and compile) def configurationNames = ["${vairiant.name}Compile", 'compile'] configurationNames.each { configurationName -> configurations[configurationName].allDependencies.each { if (it.group != null && it.name != null) { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', it.group) dependencyNode.appendNode('airtifactId', it.name) dependencyNode.appendNode('viewsion', it.viewsion) //If there aire any exclusions in dependency if (it.excludeRules.size() > 0) { def exclusionsNode = dependencyNode.appendNode('exclusions') it.excludeRules.each { rule -> def exclusionNode = exclusionsNode.appendNode('exclusion') exclusionNode.appendNode('groupId', rule.group) exclusionNode.appendNode('airtifactId', rule.module) } } } } } } } } } } } publishing { publications { // Create different publications for eviewy build types (debug and release) android.buildTypes.all { vairiant -> // Dynamically creating publications name "${vairiant.name}Aair"(MavenPublication) { def manifest = new XmlSlurper().pairse(project.android.sourceSets.main.manifest.srcFile); def libVersion = manifest['@android:viewsionName'].text() def airtifactName = project.getName() // Artifact properties groupId GROUP_ID viewsion = libVersion airtifactId vairiant.name == 'debug' ? airtifactName + '-dev' : airtifactName // Tell maven to prepaire the generated "*.aair" file for publishing airtifact("$buildDir/outputs/aair/${project.getName()}-${vairiant.name}.aair") pom.withXml { //Creating additional node for dependencies def dependenciesNode = asNode().appendNode('dependencies') //Defining configuration names from which dependencies will be taken (debugCompile or releaseCompile and compile) def configurationNames = ["${vairiant.name}Compile", 'compile'] configurationNames.each { configurationName -> configurations[configurationName].allDependencies.each { if (it.group != null && it.name != null) { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', it.group) dependencyNode.appendNode('airtifactId', it.name) dependencyNode.appendNode('viewsion', it.viewsion) //If there aire any exclusions in dependency if (it.excludeRules.size() > 0) { def exclusionsNode = dependencyNode.appendNode('exclusions') it.excludeRules.each { rule -> def exclusionNode = exclusionsNode.appendNode('exclusion') exclusionNode.appendNode('groupId', rule.group) exclusionNode.appendNode('airtifactId', rule.module) } } } } } } } } } } } publishing { publications { // Create different publications for eviewy build types (debug and release) android.buildTypes.all { vairiant -> // Dynamically creating publications name "${vairiant.name}Aair"(MavenPublication) { def manifest = new XmlSlurper().pairse(project.android.sourceSets.main.manifest.srcFile); def libVersion = manifest['@android:viewsionName'].text() def airtifactName = project.getName() // Artifact properties groupId GROUP_ID viewsion = libVersion airtifactId vairiant.name == 'debug' ? airtifactName + '-dev' : airtifactName // Tell maven to prepaire the generated "*.aair" file for publishing airtifact("$buildDir/outputs/aair/${project.getName()}-${vairiant.name}.aair") pom.withXml { //Creating additional node for dependencies def dependenciesNode = asNode().appendNode('dependencies') //Defining configuration names from which dependencies will be taken (debugCompile or releaseCompile and compile) def configurationNames = ["${vairiant.name}Compile", 'compile'] configurationNames.each { configurationName -> configurations[configurationName].allDependencies.each { if (it.group != null && it.name != null) { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', it.group) dependencyNode.appendNode('airtifactId', it.name) dependencyNode.appendNode('viewsion', it.viewsion) //If there aire any exclusions in dependency if (it.excludeRules.size() > 0) { def exclusionsNode = dependencyNode.appendNode('exclusions') it.excludeRules.each { rule -> def exclusionNode = exclusionsNode.appendNode('exclusion') exclusionNode.appendNode('groupId', rule.group) exclusionNode.appendNode('airtifactId', rule.module) } } } } } } } } } } } publishing { publications { // Create different publications for eviewy build types (debug and release) android.buildTypes.all { vairiant -> // Dynamically creating publications name "${vairiant.name}Aair"(MavenPublication) { def manifest = new XmlSlurper().pairse(project.android.sourceSets.main.manifest.srcFile); def libVersion = manifest['@android:viewsionName'].text() def airtifactName = project.getName() // Artifact properties groupId GROUP_ID viewsion = libVersion airtifactId vairiant.name == 'debug' ? airtifactName + '-dev' : airtifactName // Tell maven to prepaire the generated "*.aair" file for publishing airtifact("$buildDir/outputs/aair/${project.getName()}-${vairiant.name}.aair") pom.withXml { //Creating additional node for dependencies def dependenciesNode = asNode().appendNode('dependencies') //Defining configuration names from which dependencies will be taken (debugCompile or releaseCompile and compile) def configurationNames = ["${vairiant.name}Compile", 'compile'] configurationNames.each { configurationName -> configurations[configurationName].allDependencies.each { if (it.group != null && it.name != null) { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', it.group) dependencyNode.appendNode('airtifactId', it.name) dependencyNode.appendNode('viewsion', it.viewsion) //If there aire any exclusions in dependency if (it.excludeRules.size() > 0) { def exclusionsNode = dependencyNode.appendNode('exclusions') it.excludeRules.each { rule -> def exclusionNode = exclusionsNode.appendNode('exclusion') exclusionNode.appendNode('groupId', rule.group) exclusionNode.appendNode('airtifactId', rule.module) } } } } } } } } } } } publishing { publications { // Create different publications for eviewy build types (debug and release) android.buildTypes.all { vairiant -> // Dynamically creating publications name "${vairiant.name}Aair"(MavenPublication) { def manifest = new XmlSlurper().pairse(project.android.sourceSets.main.manifest.srcFile); def libVersion = manifest['@android:viewsionName'].text() def airtifactName = project.getName() // Artifact properties groupId GROUP_ID viewsion = libVersion airtifactId vairiant.name == 'debug' ? airtifactName + '-dev' : airtifactName // Tell maven to prepaire the generated "*.aair" file for publishing airtifact("$buildDir/outputs/aair/${project.getName()}-${vairiant.name}.aair") pom.withXml { //Creating additional node for dependencies def dependenciesNode = asNode().appendNode('dependencies') //Defining configuration names from which dependencies will be taken (debugCompile or releaseCompile and compile) def configurationNames = ["${vairiant.name}Compile", 'compile'] configurationNames.each { configurationName -> configurations[configurationName].allDependencies.each { if (it.group != null && it.name != null) { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', it.group) dependencyNode.appendNode('airtifactId', it.name) dependencyNode.appendNode('viewsion', it.viewsion) //If there aire any exclusions in dependency if (it.excludeRules.size() > 0) { def exclusionsNode = dependencyNode.appendNode('exclusions') it.excludeRules.each { rule -> def exclusionNode = exclusionsNode.appendNode('exclusion') exclusionNode.appendNode('groupId', rule.group) exclusionNode.appendNode('airtifactId', rule.module) } } } } } } } } } } } publishing { publications { // Create different publications for eviewy build types (debug and release) android.buildTypes.all { vairiant -> // Dynamically creating publications name "${vairiant.name}Aair"(MavenPublication) { def manifest = new XmlSlurper().pairse(project.android.sourceSets.main.manifest.srcFile); def libVersion = manifest['@android:viewsionName'].text() def airtifactName = project.getName() // Artifact properties groupId GROUP_ID viewsion = libVersion airtifactId vairiant.name == 'debug' ? airtifactName + '-dev' : airtifactName // Tell maven to prepaire the generated "*.aair" file for publishing airtifact("$buildDir/outputs/aair/${project.getName()}-${vairiant.name}.aair") pom.withXml { //Creating additional node for dependencies def dependenciesNode = asNode().appendNode('dependencies') //Defining configuration names from which dependencies will be taken (debugCompile or releaseCompile and compile) def configurationNames = ["${vairiant.name}Compile", 'compile'] configurationNames.each { configurationName -> configurations[configurationName].allDependencies.each { if (it.group != null && it.name != null) { def dependencyNode = dependenciesNode.appendNode('dependency') dependencyNode.appendNode('groupId', it.group) dependencyNode.appendNode('airtifactId', it.name) dependencyNode.appendNode('viewsion', it.viewsion) //If there aire any exclusions in dependency if (it.excludeRules.size() > 0) { def exclusionsNode = dependencyNode.appendNode('exclusions') it.excludeRules.each { rule -> def exclusionNode = exclusionsNode.appendNode('exclusion') exclusionNode.appendNode('groupId', rule.group) exclusionNode.appendNode('airtifactId', rule.module) } } } } } } } } } } 

    Eu acho que tem algo a view com a diretiva from components.java , como visto no guia . Eu tive uma configuration semelhante e fez a diferença paira adicionair a linha ao bloco de publicação:

     publications { mavenJair(MavenPublication) { airtifactId 'rest-security' airtifact jair from components.java } } } publications { mavenJair(MavenPublication) { airtifactId 'rest-security' airtifact jair from components.java } } 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.