Solved

what is aar in gradle

Posted on 2014-12-22
2
142 Views
Last Modified: 2015-02-10
HI,
I have a following build.gradle file :

apply plugin: 'com.android.application'

dependencies {
    compile 'com.android.support:multidex:1.0.0'

    compile('com.android.support:support-v4:21.0.0') {
        transitive = true
    }
    compile 'com.android.support:appcompat-v7:19.1.0'
    compile 'com.android.support:support-annotations:+'
    compile project(':sip')
    compile project(':sip-contracts')
    compile project(':utils')
    compile project(':account')
    compile project(':calldata')
    compile project(':onboarding')
    compile project(':boiling')
    compile project(':commons')
    compile files('libs/MobileAppTracker-3.4.jar')
    compile('to.talk.aragorn:logging:0.1-SNAPSHOT@aar') {
        transitive = true
    }
    compile ('to.talk.aragorn:gcm-client:0.4-SNAPSHOT@aar'){
        transitive = true
    }
    compile 'to.talk.aragorn:network-utils:0.12-SNAPSHOT@aar'
    compile('to.talk.aragorn:kvstore:0.3-SNAPSHOT@aar') {
        transitive = true
    }
    compile('to.talk.aragorn:error-reporting:0.2-SNAPSHOT@aar') {
        transitive = true
    }
    compile 'to.talk.aragorn:log-reporting:0.2-SNAPSHOT@aar'
    compile('to.talk.aragorn:event-utils:0.1-SNAPSHOT@aar') {
        transitive = true
    }
    compile('to.talk.aragorn:exception-utils:0.1-SNAPSHOT@aar') {
        transitive = true
    }
    compile('to.talk.aragorn:sqlite-db:0.2-SNAPSHOT@aar') {
        transitive = true
    }
    compile 'to.talk.legolas:olympus-commons:0.32-SNAPSHOT@aar'
    compile 'to.talk.legolas:conman-client:1.03-SNAPSHOT@aar'

    compile 'to.talk.legolas:kuber-client:0.22-SNAPSHOT@aar'
    compile('to.talk.aragorn:phonebook:0.1-SNAPSHOT@aar') {
        transitive = true
    }
    compile('to.talk.legolas:stream-client:0.40-SNAPSHOT@aar') {
        transitive = true
    }
    compile('to.talk.legolas:zeus-client:0.4-SNAPSHOT@aar') {
        transitive = true
    }
    compile 'com.google.guava:guava:17.0'

    compile project(':contact')
    compile 'de.greenrobot:eventbus:2.2.1'
    compile 'to.talk.aragorn:commons:0.30-SNAPSHOT@aar'
    compile 'de.hdodenhof:circleimageview:1.1.1'
    compile 'com.madgag.spongycastle:core:1.50.0.0'
    compile 'com.google.android.gms:play-services-ads:6.5.+'
    compile('to.talk.legolas:fb-sdk:0.2-SNAPSHOT@aar')
}


def computeAppBuildDate() {
    def date = new Date()
    def formattedDate = date.format('yyyyMMddHHmmss')
    return "\"${formattedDate}\""
}

def getDomain() {
    return "kujo.app"
}

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.1'
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            aidl.srcDirs = ['src']
            jniLibs.srcDirs = ['jniLibs']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res', 'res-flags']
            assets.srcDirs = ['assets']
        }
    }

    dexOptions {
        preDexLibraries = false
        javaMaxHeapSize "4g"
    }

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 19
        versionCode 11404
        versionName "1.14.04"
        buildConfigField "String", "SITE_URL", "\"http://www.tring.me\""
        buildConfigField "String", "TERMS_URL", "\"http://www.tring.me/terms.html\""
        buildConfigField "String", "DETAILED_STATS_REPORTING_ENDPOINT", "\"https://clog.handler.talk.to/tring_stats_detailed\""
        buildConfigField "String", "SUMMARY_STATS_REPORTING_ENDPOINT", "\"https://clog.handler.talk.to/tring_stats_summary\""
        buildConfigField "String", "FEEDBACK_STATS_REPORTING_ENDPOINT", "\"https://clog.handler.talk.to/tring_stats_feedback\""
        buildConfigField "String", "CALL_TERMINATION_REPORTING_ENDPOINT", "\"https://clog.handler.talk.to/tring_stats_hangup\""
        buildConfigField "String", "DOMAIN", "\"" + getDomain() + "\""
        buildConfigField "String", "CONMAN_ENDPOINT", "\"conman." + getDomain() + "\""
        buildConfigField "String", "KUBER_ENDPOINT", "\"kuber." + getDomain() + "\""
        buildConfigField "olympus.clients.commons.config.ClientType", "clientType", "olympus.clients.commons.config.ClientType.KUJO"
        buildConfigField "String", "ERROR_REPORTING_ENDPOINT", "\"error_reporting\""
        buildConfigField "String", "ANALYTICS_REPORTING_ENDPOINT", "\"analytics\""
        buildConfigField "String", "LOG_REPORTING_ENDPOINT", "\"https://clog-staging.handler.talk.to/rivadroid\""
        buildConfigField "boolean", "SEND_LOGS_BY_MAIL", "false"
        buildConfigField "boolean", "IS_LOG_STORAGE_ENABLED", "false"
        buildConfigField "String", "APOLLO_VERSION", "\"2.0\""
        buildConfigField "String", "SUPPORT_EMAIL_ADDRESS", "\"teamtringandroid@directi.com.go.to\""
        buildConfigField "String", "SIP_REGISTRAR_REALM", "\"mvoip\""
        buildConfigField "long", "CALL_STAT_REPORTING_TIME_IN_SEC", "300"
        buildConfigField "String", "MAT_ADVERTISER_ID", "\"22176\""
        buildConfigField "String", "MAT_CONVERSION_KEY", "\"d1b932ce5646b82c6183a15e8bc22a28\""
        buildConfigField "boolean", "IS_MAT_ENABLED", "false"
        buildConfigField "String", "UDP_ECHO_SERVER_ONE", "\"uecho1.use1b.talk.to\""
        buildConfigField "String", "UDP_ECHO_SERVER_TWO", "\"uecho1.use1d.talk.to\""
        buildConfigField "String", "UDP_ECHO_MESSAGE", "\"UECHO 1.0\""
        buildConfigField "String", "GCM_SENDER_ID", "\"244757587477\""
        buildConfigField "String", "CRITTERCISM_APP_ID", "\"54604de50729df3f38000001\""
        buildConfigField "boolean", "IS_FB_SDK_ENABLED", "false"
        buildConfigField "String", "FB_APP_ID", "\"291919911003322\""
        multiDexEnabled = true
    }

    lintOptions {
        abortOnError false
    }

    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }


    signingConfigs {
        release {
            storeFile file(TRING_SIGNING_CONFIG_STORE_FILE_NAME)
            storePassword TRING_SIGNING_CONFIG_STORE_PASSWORD
            keyAlias TRING_SIGNING_CONFIG_KEY_ALIAS
            keyPassword TRING_SIGNING_CONFIG_KEY_PASSWORD
        }
    }

    buildTypes {
        release {
            debuggable false
            minifyEnabled false
            proguardFile file('proguard-project.txt')
            proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
            signingConfig signingConfigs.release
            buildConfigField "boolean", "ERROR_REPORTING", "true"
            buildConfigField "boolean", "LOG_REPORTING", "false"
            buildConfigField "boolean", "ANALYTICS_REPORTING", "true"
            buildConfigField "String", "APP_BUILD_DATE", computeAppBuildDate()
            buildConfigField "boolean", "SEND_LOGS_BY_MAIL", "true"
            buildConfigField "boolean", "IS_LOG_STORAGE_ENABLED", "true"
            buildConfigField "boolean", "IS_MAT_ENABLED", "true"
            buildConfigField "String", "SUPPORT_EMAIL_ADDRESS", "\"android@tring.me\""
            buildConfigField "boolean", "IS_FB_SDK_ENABLED", "true"
            buildConfigField "String", "FB_APP_ID", "\"291855387676441\""
        }

        debug {
            applicationIdSuffix ".debug"
            minifyEnabled false
            debuggable true
            buildConfigField "boolean", "ERROR_REPORTING", "false"
            buildConfigField "boolean", "LOG_REPORTING", "false"
            buildConfigField "boolean", "ANALYTICS_REPORTING", "false"
            buildConfigField "String", "APP_BUILD_DATE", computeAppBuildDate()
        }

        qa.initWith(buildTypes.debug)
        qa {
            applicationIdSuffix ".qa"
            buildConfigField "boolean", "ERROR_REPORTING", "true"
            buildConfigField "boolean", "SEND_LOGS_BY_MAIL", "true"
            buildConfigField "boolean", "IS_LOG_STORAGE_ENABLED", "true"
        }

        alpha.initWith(buildTypes.release)
        alpha {
            applicationIdSuffix ".alpha"
            minifyEnabled false
            debuggable true
            signingConfig signingConfigs.release
            buildConfigField "boolean", "IS_FB_SDK_ENABLED", "true"
            buildConfigField "boolean", "SEND_LOGS_BY_MAIL", "true"
            buildConfigField "boolean", "IS_LOG_STORAGE_ENABLED", "true"
            buildConfigField "String", "SUPPORT_EMAIL_ADDRESS", "\"teamtringandroid@directi.com.go.to\""
            buildConfigField "String", "FB_APP_ID", "\"291919911003322\""
        }
    }
    productFlavors {
        prod {
            buildConfigField "olympus.clients.commons.config.Environment", "environment", "olympus.clients.commons.config.Environment.PRODUCTION"
            buildConfigField "String", "SIP_REGISTRAR_IP", "\"209.15.246.86\""
            buildConfigField "int", "SIP_REGISTRAR_PORT", "4000"
            buildConfigField "String", "DOOR_HOST_NAME", "\"doormobile.handler.talk.to\""
            buildConfigField "String", "DOOR_PORT", "\"443\""

        }

        staging {
            buildConfigField "olympus.clients.commons.config.Environment", "environment", "olympus.clients.commons.config.Environment.STAGING"
            buildConfigField "String", "SIP_REGISTRAR_IP", "\"68.178.129.125\""
            buildConfigField "int", "SIP_REGISTRAR_PORT", "4000"
            buildConfigField "String", "DOOR_HOST_NAME", "\"doorstaging.handler.talk.to\""
            buildConfigField "String", "DOOR_PORT", "\"5222\""

        }
    }
}

Open in new window


I am new to gradle. What doe the following line means :
   compile 'to.talk.aragorn:network-utils:0.12-SNAPSHOT@aar'

whats an aar ?

Thanks
0
Comment
Question by:Rohit Bajaj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 40514321
So that line is describing a dependency of the project being built by the build.gradle file. It means that to "compile" the project, it needs to locate a dependency which is an "aar" artifact from the "0.12-SNAPSHOT" version of the "network-utils" artifact in the "to.talk.aragon" group.

The AAR stands for Android ARchive. It is a particular type of packaging of Java based code/resources/etc. It is a kin to JAR = Java ARchive, WAR = Web ARchive, EAR = Enterprise ARchive, etc. They are all just plain ZIP files but having a certain internal structuring of their files. Refer to http://tools.android.com/tech-docs/new-build-system/aar-format for details of this internal structure.
0
 

Author Comment

by:Rohit Bajaj
ID: 40516103
How does gradle locate this dependency ?
Where will this aar be found ?
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Often, people trade privacy and security for convenience. However in today's concrete jungle, this is an extremely foolish decision considering the vast amount of technologies being used against consumer interest. First off, I won't waste any time e…
The case of the missing phone talks about the way a small electronic gadget (the mobile phone) has penetrated into our lives and has made us addicted to it.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

749 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