# Class GenerateModuleMetadata

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.publish.tasks.GenerateModuleMetadata

All Implemented Interfaces:
  `Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, Named, ExtensionAware, Task, Configurable<Task>`

@DisableCachingByDefault(because="Not made cacheable, yet") public abstract class GenerateModuleMetadata extends DefaultTask
Generates a Gradle metadata file to represent a published `SoftwareComponent` instance.

Since:
  4.3

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `(package private) static class`
  `GenerateModuleMetadata.InputState`

  ### Nested classes/interfaces inherited from interface Named

  `Named.Namer`

- ## Field Summary

  ### Fields inherited from interface Task

  `TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GenerateModuleMetadata()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `(package private) FileCollection`
  `getArtifacts()`
  `protected abstract org.gradle.internal.scopeids.id.BuildInvocationScopeId`
  `getBuildInvocationScopeId()`
  Returns the `BuildInvocationScopeId` to use for generation.
  `protected abstract org.gradle.internal.hash.ChecksumService`
  `getChecksumService()`
  Returns the `ChecksumService` to use.
  `protected abstract org.gradle.api.publish.internal.mapping.DependencyCoordinateResolverFactory`
  `getDependencyCoordinateResolverFactory()`
  `protected abstract org.gradle.api.internal.file.FileCollectionFactory`
  `getFileCollectionFactory()`
  Returns the `FileCollectionFactory` to use for generation.
  `protected abstract ObjectFactory`
  `getObjectFactory()`
  `abstract RegularFileProperty`
  `getOutputFile()`
  Returns the output file location.
  `protected abstract org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectDependencyPublicationResolver`
  `getProjectDependencyPublicationResolver()`
  Returns the `ProjectDependencyPublicationResolver` to use for generation.
  `Property<Publication>`
  `getPublication()`
  Returns the publication to generate the metadata file for.
  `ListProperty<Publication>`
  `getPublications()`
  Returns the publications of the current project, used in generation to connect the modules of a component together.
  `abstract SetProperty<String>`
  `getSuppressedValidationErrors()`
  Returns the set of suppressed validation errors
  `protected abstract org.gradle.api.internal.tasks.TaskDependencyFactory`
  `getTaskDependencyFactory()`
  `(package private) void`
  `run()`

  ### Methods inherited from class DefaultTask

  `compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService`

  ### Methods inherited from class org.gradle.api.internal.AbstractTask

  `acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getLoggingManager, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, service, setImpliesSubProjects`

  ### Methods inherited from class Object

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

  ### Methods inherited from interface Task

  `doNotTrackState, notCompatibleWithConfigurationCache, service`

- ## Constructor Details

  - ### GenerateModuleMetadata

    public GenerateModuleMetadata()

- ## Method Details

  - ### getPublication

    @Internal public Property<Publication> getPublication()
    Returns the publication to generate the metadata file for.

  - ### getPublications

    @Internal public ListProperty<Publication> getPublications()
    Returns the publications of the current project, used in generation to connect the modules of a component together.
    Since:
      4.4

  - ### getArtifacts

    @InputFiles @PathSensitive(NAME_ONLY) FileCollection getArtifacts()

  - ### getFileCollectionFactory

    @Inject protected abstract org.gradle.api.internal.file.FileCollectionFactory getFileCollectionFactory()
    Returns the `FileCollectionFactory` to use for generation.
    Since:
      4.4

  - ### getBuildInvocationScopeId

    @Inject protected abstract org.gradle.internal.scopeids.id.BuildInvocationScopeId getBuildInvocationScopeId()
    Returns the `BuildInvocationScopeId` to use for generation.
    Since:
      4.4

  - ### getProjectDependencyPublicationResolver

    @Inject protected abstract org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectDependencyPublicationResolver getProjectDependencyPublicationResolver()
    Returns the `ProjectDependencyPublicationResolver` to use for generation.
    Since:
      4.4

  - ### getChecksumService

    @Inject protected abstract org.gradle.internal.hash.ChecksumService getChecksumService()
    Returns the `ChecksumService` to use.
    Since:
      6.6

  - ### getOutputFile

    @OutputFile public abstract RegularFileProperty getOutputFile()
    Returns the output file location.

  - ### getSuppressedValidationErrors

    @Input public abstract SetProperty<String> getSuppressedValidationErrors()
    Returns the set of suppressed validation errors
    Since:
      7.0

  - ### run

    void run()

  - ### getObjectFactory

    @Inject protected abstract ObjectFactory getObjectFactory()

  - ### getDependencyCoordinateResolverFactory

    @Inject protected abstract org.gradle.api.publish.internal.mapping.DependencyCoordinateResolverFactory getDependencyCoordinateResolverFactory()

  - ### getTaskDependencyFactory

    @Inject protected abstract org.gradle.api.internal.tasks.TaskDependencyFactory getTaskDependencyFactory()