Embed Android dependencies in to Android library -


i create android self-consistent library, has inside external dependencies (like retrofit). want use in main project without having re-import library dependencies. possibile?

this library build.gradle:

apply plugin: 'com.android.library'  android {     compilesdkversion 21     buildtoolsversion "21.1.2"      defaultconfig {         applicationid "my.lib"         minsdkversion 8         targetsdkversion 21         versioncode 4         versionname "0.4.0"     }     buildtypes {         release {             minifyenabled false             proguardfiles getdefaultproguardfile('proguard-android.txt'),'proguard-rules.pro'         }     } }  dependencies {     compile 'com.squareup.retrofit:retrofit:1.8.0' } 

this app build.gradle:

apply plugin: 'com.android.application'  android {     compilesdkversion 21     buildtoolsversion "21.1.2"      defaultconfig {         applicationid "my.app"         minsdkversion 15         targetsdkversion 21         versioncode 1         versionname "1.0"     }     buildtypes {         release {             minifyenabled false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'         }     } }  dependencies {     // app dependencies     compile 'com.android.support:support-v4:22.2.1'     compile 'com.android.support:appcompat-v7:22.2.1'      // lib dependencies     compile 'my.lib:example:0.1.0'     compile 'com.squareup.retrofit:retrofit:1.8.0' //<--- don't want re-import dependency } 


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -