79781755

Date: 2025-10-03 12:17:06
Score: 1.5
Natty:
Report link

After some research and experimentation with test projects, I have reached some conclusions.

GroupId is not relevant when executing `gradle build`. However it is relevant when executing `gradle publish', either locally or to a repository. When publishing a project, the generated artifact goes to local file system or to a repository. In both cases, the path is determined by the GroupId (e.g. GroupId: 'com.company.product' -> Path: com/company/product).

When the published project is loaded as a dependency by another project, the GroupId should be correct (e.g. `implementation 'com.company.product:LibraryProject:1.0.0'`). Otherwise, the published project cannot be loaded.

Regarding package names, it is not mandatory that they start with the GroupId. However, it is recommended to keep package names and GroupId aligned, both for semantic reasons and for containing the namespace.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Giorgos