title: How to automatically generate aar/jar and import to app in android studio gradule
body: <p>I am recently developing a library and a sample app which is using the library i am developing now. I would like to know how i can set up an automatic flow to make my sample app import the aar/jar file generate by my library.</p>
  
  <p>Now what im doing is I import the whole library project into my sample app by using </p>
  
  <p><code>compile project(":mylibraryProjectName")</code> </p>
  
  <p>This is a good way for me as lib developer to test so far. However when i release the lib i will only release the jar file. For this reason, i would like to simulate the flow. That being said, I would like to have my sample app compile the jar/aar file i generate when every time i build the code. </p>
  
  <p>I think I might need to do some config on my library build.gradle file so that it can generate a aar file every time when i build and run the sample project with latest aar/jar file. Can anyone please guide me a direction and let me know if there is a way to achieve this? </p>