| title | Publish artifacts with Gradle |
|---|---|
| description | Learn how to connect to a feed and publish your packages with Gradle. |
| ms.service | azure-devops-artifacts |
| ms.topic | how-to |
| ms.date | 05/12/2025 |
| ms.author | rabououn |
| author | ramiMSFT |
| monikerRange | <=azure-devops |
| recommendations | true |
[!INCLUDE version-lt-eq-azure-devops]
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.
| Product | Requirements |
|---|---|
| Azure DevOps | - An Azure DevOps organization. - An Azure DevOps project. - Download and install Gradle. |
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:
-
Sign in to your Azure DevOps organization, and then navigate to your project.
-
Select Artifacts, then select Create Feed.
-
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.
-
Select Create when you're done.
-
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.
-
In your project directory, run the following command to publish your package:
gradle publish -
Once published, navigate to your feed. You should see your packages listed, as shown in the example below:
:::image type="content" source="media/publish-package-gradle.png" alt-text="A screenshot displaying a package successfully published to the feed.":::