What is an archive classifier in Gradle?

Viewed 4214

In a build.gradle, inside of task.register, I can find this

group 'build'
description 'Build the project for the R1 target and assemble a zip with the APK and the client library'
classifier variantNameCap

I've read that classifier should be relative to the archive. But what is exactly the concept of classifier in Gradle?

1 Answers

It's a concept taken from maven - see https://maven.apache.org/pom.html and search for classifier.

The classifier distinguishes different artifacts build from the same project.

A classifier could be something like fat or shaded where all dependencies are in a fat jar and/or shaded.

Classifiers like debug or source are quite common. The debug artifact will contain all debug information and the source artifact will contain the source files.

Related