Edit

Share via


Publish packages - Gradle

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

Azure Artifacts enables developers to manage all their dependencies in one place by storing multiple package types in a single feed. This article walks you through connecting to an Azure Artifacts feed and publishing packages using Gradle.

Prerequisites

Product Requirements
Azure DevOps - An Azure DevOps organization.
- An Azure DevOps project.
- Download and install Gradle.

Create a feed

Azure Artifacts recommends using one feed for consuming packages and a separate one for publishing your internal packages. If you already have a feed, you can skip this step. Otherwise, follow these steps to create a new feed:

  1. Sign in to your Azure DevOps organization, and then navigate to your project.

  2. Select Artifacts, then select Create Feed.

  3. Provide a Name for your feed and set its Visibility, then select a Scope for your feed. If you'd like to include packages from public registries, check the Upstream sources checkbox.

  4. Select Create when you're done.

Publish packages

  1. If you haven't authenticated with your feed yet, follow the steps in Project setup to set up your config files and authenticate with your feed.

  2. In your project directory, run the following command to publish your package:

    gradle publish
    
  3. Once published, navigate to your feed. You should see your packages listed, as shown in the example below:

    A screenshot displaying a package successfully published to the feed.