Solved

How to make an aar in Android Studio and upload it to a repository

Posted on 2014-12-26
1
210 Views
Last Modified: 2015-01-23
HI,
I have the following build.gradle file :

apply plugin: 'android-library'
apply plugin: 'maven'


android {
    compileSdkVersion 19
    buildToolsVersion '19.1'
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
        }
    }
    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }

   lintOptions {
        abortOnError false
    }
}

dependencies {
    compile project(':olympus-commons')
    compile project(':stream-client')
    compile project(':door-proxy')

    compile 'com.google.guava:guava:17.0'

    compile 'to.talk.aragorn:logging:0.1-SNAPSHOT@aar'
    compile 'to.talk.aragorn:event-utils:0.1-SNAPSHOT@aar'
    compile 'to.talk.aragorn:commons:0.30-SNAPSHOT@aar'

  }

def coreAarFile = file('build/conman-client.aar')
artifacts {
    archives coreAarFile
}

uploadArchives {
    repositories {
        mavenDeployer {
            repository(url: "http://ci.aws.talk.to:8081/nexus/content/repositories/snapshots",
                    authentication: [
                            userName: 'deployer',
                            password: 'qwedsa'
                    ])
            pom.groupId = 'to.talk.legolas'
            pom.artifactId = 'conman-client'
            pom.version = '1.01-SNAPSHOT'
        }
    }
}

Open in new window


When i build my module it builds sucessfully and there is a build folder output but i dont see the conman-client.aar file there.

How to use gradle to upload a file to repository
0
Comment
Question by:Rohit Bajaj
1 Comment
 
LVL 21

Accepted Solution

by:
Amitkumar Panchal earned 500 total points
ID: 40529066
Is there any directory called  build/outputs/aar/ genereated ? If so, please check at that location.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question