Solved

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

Posted on 2014-12-26
1
207 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
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 …

932 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now