1

The issue I have is the following (android development):

I have a library that I'm maintaining and an app that uses this library. They are both different android studio projects. In order to use a new version of the library in the app I have to:

  1. Build the library and push it to artifactory
  2. Have the library as a gradle dependency. Update the library version in app's gradle
  3. Rebuild app, install and test library through the app

Since this takes up to 10 minutes every time I want to test something, I was thinking if there is a way to speed up the process. Specifically, is there a way that I can link somehow in the gradle the library dependency directly to the its source code? That way, every time I make a small change in the library, I would only need to build the app (and implicitly the library would be built) and would reflect the library changes immediately.

Of course I am open to any workarounds that can speed up this routine.

user10293922
  • 181
  • 1
  • 3
  • Yes, you're looking for [library modules](https://developer.android.com/studio/projects/android-library) – Michael Dodd Jan 09 '19 at 12:45
  • Possible duplicate of [How do I add a library project to Android Studio?](https://stackoverflow.com/questions/16588064/how-do-i-add-a-library-project-to-android-studio) – Michael Dodd Jan 09 '19 at 12:46
  • And if you're worried about duplicate code, use a symbolic link to your library code base if you're using Linux or Mac. – Michael Dodd Jan 09 '19 at 12:49
  • Adding the library as a module would be a no-go since it should be maintained on its own separate project. For testing purposes though it's cumbersome to do the steps described in the ticket. I am asking if I can have a reference directly to the source code of the library (even though separate project) or any other similar solution. Symbolic link could actually work! – user10293922 Jan 09 '19 at 12:52
  • That's why I added the note about a symbolic link. Have it pointing from the `src` dir of the library module within your main app to the `src` dir of your library project. – Michael Dodd Jan 09 '19 at 12:53

0 Answers0