anchor.diff:  include::sample[dir="java-feature-variant/requiring-features/kotlin/consumer",files="build.gradle.kts[tags=consumer]"]
   ====
   
  +This will automatically bring the `mysql-connector-java` dependency on runtime classpath.
  +If there were more than one dependencies, all of them would be brought, meaning that a feature can be used to group dependencies which contribute to a feature together.
  +
   Similarly, if the experimental Gradle metadata feature is enabled, it is possible to depend on an external dependency providing feature variants:
   
   .Consuming specific features from an external repository
  
positive.code: ====
  Depending on the metadata file format, publishing feature variants may be lossy:
  
  - using {metadata-file-spec}[Gradle metadata], everything is published and consumers will get the full benefit of feature variants
  - using POM metadata (Maven), feature variants are published as **optional dependencies** and artifacts of feature variants are published with different _classifiers_
  - using Ivy metadata, feature variants are lost
  ====
  
  Publishing feature variants is supported using the `maven-publish` plugin only.
  
negative.code: ====
  As mentioned earlier, feature variants can be lossy when published.
  As a consequence, a consumer can depend on a feature variant only in two cases:
  
  - with a project dependency (in a multi-project build)
  - with Gradle metadata enabled (the publisher MUST have published using Gradle metadata)
  ====
  