0

I am developing a Android library, and I am looking for guidance on how to speed up the mechanics of developing the library for use in an application.

In my production workflow, I publish the aar library to a private maven repository. This aar library is retrieved through gradle by multiple applications. This works fine for production.

I am looking for a good development workflow to use development versions of the library. These are the options I have identified, none of which I find entirely satisfactory:

  1. Publishing each development library version to the private maven repository. Continually publishing development versions of the library to the maven repository and retrieving them to run once in a test application is very cumbersome because this requires either using a new version for every development version or wiping the local gradle cache when reusing the same version.
  2. Copying the source of the library into the source of the project, described in the accepted answer. This seems to defeat the purpose of having a library.
  3. Switching the application to use a local file version of the aar library. Importing the aar library introduces changes to the build files of the application that need to be reverted when going back to the production use of the maven repository.

Is there a way I can insert my development versions of the aar library into the local gradle cache so they can be retrieved locally, while maintaining the same application build configuration present in the production version? Or is there a simpler workflow for library development?

Community
  • 1
  • 1
mattm
  • 5,851
  • 11
  • 47
  • 77

1 Answers1

0

My solution for library development was to upload to maven, and clear one the corresponding entry in the local gradle cache. See Is there a simple way to remove one dependency from the local gradle cache?.

Community
  • 1
  • 1
mattm
  • 5,851
  • 11
  • 47
  • 77