Solved

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

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

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

708 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

11 Experts available now in Live!

Get 1:1 Help Now