In the previous section, you learned that the Java plugin adds an archives
configuration that is used to group artifacts from the project. Just as we created configurations for dependencies in our project, we can also create our own configurations for its artifacts. To assign an archive or file to this configuration, we must use the artifacts
configuration block in our build script. Inside the configuration closure, we use the name of the configuration followed by the artifact. We can also further customize the artifact definition inside the artifacts
block.
We can define artifacts with the following three types: