androidazure-devopsgit-submodulesandroid-library

How to publish an Android library project hosted on Azure DevOps


I'm using Azure DevOps to host Three repositories, two of which are the main projects, the third one is a library I've written, Now I need a way to publish this library so it can be used on the two projects and any other projects the company will be working on, but unlike Github that I would just create a release and publish the library then maybe go to jitpack.io and generate the dependency, I need a way to do the same here on Azure DevOps.

If anyone has done anything like that or something similar on Azure DevOps, I'll really appreciate an idea of how you handled it or a link to how it's done. Thanks in advance.


Solution

  • On Azure DevOps, we have the Azure Artifacts feature to store the packages depended by the program.

    Normally, you can select using Maven for your Android packages:

    1. You can reference the document "Publish a Maven artifact using Gradle" to manually build and publish your library to Azure Artifacts from your local machine.

    2. If you want to set the CI/CD for your library so that when you make some updates on the source code of the library, it will trigger a pipeline to automatically build and publish a new package version with the updates to Azure Artifacts. You can reference the document "Set up Azure Pipelines and Maven".

    If you have built and packaged the library and there is not often updates on the library, you just want to upload the package to Azure Artifacts, you can select using Universal.