32

Gradle documentation lists group as a property of Project.

I failed to find any hints about the purpose and/or usage of this property.

Please point me into the right direction.

1 Answer 1

28

group signifies the groupId of the project/task that is being worked on.

com.example:my-project:0.1
----------- ---------- ---
     |         |        |
   groupId  artifact  version
Sign up to request clarification or add additional context in comments.

9 Comments

What are the benefits of assigning a value to group in build.gradle?
The same benefit we get having packages for classes. This helps is customizing maven artifact.
Will this line from build.gradle in groovy-core be adequate or should I be more specific?
You compared groups with packages for classes. Packages in addition to grouping multiple classes together at the same logical location, also impact visibility levels of class variables. Do groups have secondary functions of any sort? Also, are they strictly for use with Maven?
Mainly grouping is the point of concern here. It would differ from package when you pointed out visibility levels. Take for example, grails plugins, the default group for grails plugins is org.grails.plugins. They are not strictly use with Maven (as a build tool). They follow the Maven artifact definifion, so that it can be referred from maven central repo. Does it help?
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.