Skip to content

Packages uploaded via Gradle appear in the Group rather than the Project

Summary

Initially reported by a customer.

Maven packages (specifically snapshots) uploaded via Gradle appear under the parent Group's package listing via the UI, while the Project's package listing appears empty.

group_view

However, the package is shown within the project when listing packages via the Packages API.

packages_api

Clicking on the package from the Group listing takes you to the package within the Project view.

project_view

This issue is not present when publishing a snapshot via Maven directly. When comparing the two uploaded snapshots in the packages_packages table, it looks like the Gradle-uploaded package is not populating the version column.

image

Steps to reproduce

Ensure gradle is installed and available on your system.

  1. Fork the example project below into a group with a plan of Silver or above (optionally use the attached tar of the project)

  2. Adjust the url, and value params within the build.gradle file to match your Project ID and personal access token respectively.

  3. Ensure the version defined in the build.gradle is a snapshot - e.g. 0.1-SNAPSHOT

  4. Run gradle wrapper within the project's directory to generate the needed gradle wrapper files

  5. Run ./gradlew build

  6. Run ./gradlew publish

  7. Once the publish is completed successfully, check the available packages within your group and project.

Example Project

Example project: https://gitlab.com/broken_gradle/gradle_upload

Example group: https://gitlab.com/broken_gradle

What is the current bug behavior?

Packages do not appear in the UI via the Project's package listing, but instead the Group.

What is the expected correct behavior?

Packages appear within the Package's project listing.

Relevant logs and/or screenshots

See above screenshots.

tar of project

Output of checks

This bug happens on GitLab.com.

Edited by Caleb Williamson