PlatformDependencyModifiers.EnforcedPlatformDependencyModifier (Gradle API 9.2.0)
Description: declaration: package: org.gradle.api.plugins.jvm, interface: PlatformDependencyModifiers, class: EnforcedPlatformDependencyModifier

Package org.gradle.api.plugins.jvm

# Class PlatformDependencyModifiers.EnforcedPlatformDependencyModifier

java.lang.Object
org.gradle.api.artifacts.dsl.DependencyModifier
org.gradle.api.plugins.jvm.PlatformDependencyModifiers.EnforcedPlatformDependencyModifier

Enclosing interface:
  `PlatformDependencyModifiers`

@Incubating public abstract static class PlatformDependencyModifiers.EnforcedPlatformDependencyModifier extends DependencyModifier
Implementation for the enforced platform dependency modifier.

Since:
  8.0
See Also:
  - `modifyImplementation(ModuleDependency)`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EnforcedPlatformDependencyModifier()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected abstract ObjectFactory`
  `getObjectFactory()`
  Injected service to create named objects.
  `protected void`
  `modifyImplementation(ModuleDependency dependency)`
  Modify the given dependency.

  ### Methods inherited from class org.gradle.api.artifacts.dsl.DependencyModifier

  `getDependencyFactory, modify, modify, modify, modify`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### EnforcedPlatformDependencyModifier

    public EnforcedPlatformDependencyModifier()

- ## Method Details

  - ### getObjectFactory

    @Inject protected abstract ObjectFactory getObjectFactory()
    Injected service to create named objects.
    Returns:
      injected service
    Implementation Requirements:
      Do not implement this method. Gradle generates the implementation automatically.

  - ### modifyImplementation

    protected void modifyImplementation(ModuleDependency dependency)
    Modify the given dependency. Selects the enforced platform variant of the given dependency.
    Specified by:
      `modifyImplementation` in class `DependencyModifier`
    Parameters:
      `dependency` - the dependency to modify