code: public void shareProject(Object projectIdOrPath, Integer groupId, AccessLevel accessLevel, Date expiresAt)
              throws GitLabApiException {
          GitLabApiForm formData = new GitLabApiForm()
              .withParam("group_id", groupId, true)
              .withParam("group_access", accessLevel, true)
              .withParam("expires_at", expiresAt);
          post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "share");
      }
docs: Share a project with the specified group.
  
  <pre><code>POST /projects/:id/share</code></pre>
  
  @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
  @param groupId the ID of the group to share with, required
  @param accessLevel the permissions level to grant the group, required
  @param expiresAt the share expiration date, optional
  @throws GitLabApiException if any exception occurs