gradle
8.5

# AdhocComponentWithVariants

interface AdhocComponentWithVariants : SoftwareComponent(source)

A component which can declare additional variants corresponding to features. When published to Maven POMs, the dependencies of those variants are exposed as optional dependencies. When published to Gradle metadata, the variants are published as is.

## Functions

addVariantsFromConfiguration
Link copied to clipboard
abstract fun addVariantsFromConfiguration(outgoingConfiguration: Configuration, action: Action<out Any>)
Declares an additional variant to publish, corresponding to an additional feature.
getName
Link copied to clipboard
abstract fun getName(): String
withVariantsFromConfiguration
Link copied to clipboard
abstract fun withVariantsFromConfiguration(outgoingConfiguration: Configuration, action: Action<out Any>)
Further configure previously declared variants.