понедельник, 6 июля 2015 г.

Library as aar file

CREATING AAR
in build.gradle of the library:

apply plugin: 'com.android.library'

aar can be found in build/outputs/aar/ 

USE
in build.gradle of the project:
repositories {
    flatDir {
        dirs 'libs'
    }
}

dependencies {
    compile(name:'cards', ext:'aar')
}

Do-not-forget proguard settings

http://proguard.sourceforge.net/manual/examples.html#stacktrace:
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable