Is it possible to publish a package through GitLab for people to depend on through something like Graddle?

I’m working on a solution to a problem I had in a personal project with Flutter and I would like to share this solution in the form of a package for other people to solve this same specific problem.

My problem is solved, but it can get more polished for being used in more situations than mine, which would require it to be a separate project.

Is it possible for a free user of GitLab.com to publish a package somebody can depend on by adding a dependency in their pubspec.yaml or build.gradle directly? Or the only alternative is to go for something like pub.dev?

I’m new to this whole package publishing thing (I would probably still need to first purchase a domain name for using in the package, but I’m already looking for that elsewhere).

Thanks

1 Like

@bergamin Welcome to the GitLab forums! Is the goal to host the package on GitLab, similar to how it would be hosted in Maven Central?

You can create a dedicated, public project for your package and include a readme, issues, MRs and everything. You can also publish it using the instance level endpoint, and it will be available to anyone using GitLab.com and looking for items in the shared Maven Repository.

https://docs.gitlab.com/ee/user/packages/maven_repository/#getting-started