How do I declare the groupId, artifactId, and the version of a build?

How do I say what version this thing is? The dependency management seem straight forward enough, but how do I declare the groupId, artifactId, and the version of “this” build?

In the simplest case, you just set ‘project.group’, ‘project.name’, and ‘project.version’. ‘project.name’ has to be set in ‘settings.gradle’, as it’s read-only thereafter (e.g. ‘rootProject.name = “foo”’).