title: Transitive Library dependencies are not found in the application
body: <p>Say I have a library module which contains some 3rd party libraries like OkHttp. When I include this library in my application I was unable to use these 3rd party libraries. I read the following articles <a href="https://stackoverflow.com/questions/22795455/transitive-dependencies-not-resolved-for-aar-library-using-gradle">Article 1</a>, 
  <a href="https://stackoverflow.com/questions/25698160/can-an-aar-include-transitive-dependencies">Article 2</a>
  and tried<br>
  1. <code>compile project(':library-name')</code><br>
  {after importing the .aar file(of library) as a module into myproject}<br>
  2. I included the .aar file in libs folder and added following dependencies </p>
  
  <p>build.gradle(project level)  </p>
  
  <pre><code>allprojects {
  repositories {
      flatDir {
          dirs 'libs'
      }
  }
  }
  </code></pre>
  
  <p>build.gradle(application level)  </p>
  
  <pre><code>compile fileTree(dir: 'libs', include: ['*.jar'])
  compile ('com.myapp.package:library-name:1.0.0@aar'){
  transitive=true
  }
  </code></pre>
  
  <p>3. similar to 2nd but in<br>
  build.gradle(application level)  </p>
  
  <pre><code>compile fileTree(dir: 'libs', include: ['*.jar'])
  compile (name:'library-name', ext:'aar'){
  transitive=true
  }
  </code></pre>
  
  <p>But, still I was unable to use the transitive libraries which are present in my library. I am getting following exception.</p>
  
  <pre><code>java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/okhttp/MediaType;
  </code></pre>
  
  <p>Can someone help</p>
  
  <p>EDIT:<br>
  The following is build.gradle of my library</p>
  
  <pre><code>compile fileTree(dir: 'libs', include: ['*.jar'])
  testCompile 'junit:junit:4.12'
  compile 'com.android.support:appcompat-v7:23.1.1'
  
  compile 'org.apache.httpcomponents:httpcore:4.4.4'
  compile 'org.apache.httpcomponents:httpclient:4.5.1'
  
  compile 'com.squareup.okhttp:okhttp:2.6.0'
  compile 'petrov.kristiyan.colorpicker:colorpicker-library:1.0.3'
  
  
  testCompile 'junit:junit:4.12'
  
  testCompile 'org.mockito:mockito-core:1.10.19'
  
  testCompile 'org.hamcrest:hamcrest-library:1.1'
  
  compile files('notificationlog-0.1.0.jar')
  </code></pre>
  
  <p>I was able to use the <code>notificationlog</code> in my application which was a dependency in my library, but I was unable to use <code>okhttp</code> and <code>colorpicker</code></p>