Class PreferProjectCompatibilityRule

java.lang.Object
com.palantir.gradle.dist.artifacts.PreferProjectCompatibilityRule
All Implemented Interfaces:
org.gradle.api.Action<org.gradle.api.attributes.CompatibilityCheckDetails<org.gradle.api.attributes.Category>>, org.gradle.api.attributes.AttributeCompatibilityRule<org.gradle.api.attributes.Category>

public final class PreferProjectCompatibilityRule extends Object implements org.gradle.api.attributes.AttributeCompatibilityRule<org.gradle.api.attributes.Category>
PreferProjectCompatibilityRule works alongside artifactTransformers in DependencyDiscovery to ensure that we apply the right transformation to project dependencies to avoid compilation. Since the consuming ArtifactView specifies that it requires Category.CATEGORY_ATTRIBUTE of PROJECT Gradle will select outgoing variants that have the attribute applied and ignore variants with other values. This rule will make it so that we will fall back to accepting a variant with Category.CATEGORY_ATTRIBUTE of EXTERNAL if there is no other variants.
  • Field Details

  • Method Details

    • configureRule

      public static void configureRule(org.gradle.api.Project project)
    • execute

      public void execute(org.gradle.api.attributes.CompatibilityCheckDetails<org.gradle.api.attributes.Category> details)
      Specified by:
      execute in interface org.gradle.api.Action<org.gradle.api.attributes.CompatibilityCheckDetails<org.gradle.api.attributes.Category>>