# Variant

@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Incubating
annotation class Variant(source)

### Deprecated

The Gradle software model is deprecated and will be removed in Gradle 10. Use the new component model (e.g. `cpp-application`, `cpp-library`, `swift-application`, `swift-library`, `xctest`) instead.

Declares that a property represents a variant dimension. Variants are used in dependency resolution to discriminate between various binaries that may match the requirements (such as a platform, a build type, ...). This annotation must be set on a getter. The return type of the getter must either be a String or a class implementing org.gradle.api.Named.

#### Since

2.6

## Functions

annotationType
Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
equals
Link copied to clipboard
abstract fun equals(p: Any): Boolean
hashCode
Link copied to clipboard
abstract fun hashCode(): Int
toString
Link copied to clipboard
abstract fun toString(): String