# Deprecated API

## Contents

- Interfaces
- Classes
- Exception Classes
- Annotation Types
- Methods

- Deprecated Interfaces
  Interface
  Description
  org.gradle.api.execution.TaskActionListener
  This type is not supported when configuration caching is enabled.
  org.gradle.api.execution.TaskExecutionListener
  This type is not supported when configuration caching is enabled.

- Deprecated Classes
  Class
  Description
  org.gradle.api.reporting.components.ComponentReport
  org.gradle.api.reporting.dependents.DependentComponentsReport
  org.gradle.api.reporting.model.ModelReport
  org.gradle.api.tasks.diagnostics.AbstractReportTask
  Use `AbstractProjectBasedReportTask` instead.
  org.gradle.api.tasks.diagnostics.ProjectBasedReportTask
  Use `AbstractProjectBasedReportTask` instead.

- Deprecated Exception Classes
  Exception Class
  Description
  org.gradle.api.UncheckedIOException
  Use java.io.UncheckedIOException instead. Will be removed in Gradle 10.

- Deprecated Annotation Types
  Annotation Type
  Description
  org.gradle.api.NonNullApi
  Deprecated in Gradle 9 for removal in Gradle 10. Prefer JSpecify annotations such as `NullMarked` and `Nullable`. Note that you can also still use JSR305 annotations such as `Nonnull` and `Nullable`.

- Deprecated Methods
  Method
  Description
  org.gradle.api.artifacts.Configuration.isVisible()
  This property is deprecated and will be removed in Gradle 10.
  org.gradle.api.artifacts.Configuration.setVisible(boolean)
  This property is deprecated and will be removed in Gradle 10.
  org.gradle.api.artifacts.DependenciesMetadata.add(Map<String, String>)
  This method will be removed in Gradle 10. Use `DependenciesMetadata.add(String)` instead.
  org.gradle.api.artifacts.DependenciesMetadata.add(Map<String, String>, Action<? super T>)
  This method will be removed in Gradle 10. Use `DependenciesMetadata.add(String, Action)` instead.
  org.gradle.api.artifacts.dsl.Dependencies.getObjectFactory()
  This method is deprecated and will be removed in Gradle 10.
  org.gradle.api.artifacts.dsl.Dependencies.module(String, String, String)
  This method will be removed in Gradle 10. Use single-string notation instead.
  org.gradle.api.execution.TaskExecutionGraph.addTaskExecutionListener(TaskExecutionListener)
  This method is not supported when configuration caching is enabled.
  org.gradle.api.execution.TaskExecutionGraph.afterTask(Closure)
  This method is not supported when configuration caching is enabled.
  org.gradle.api.execution.TaskExecutionGraph.afterTask(Action<Task>)
  This method is not supported when configuration caching is enabled.
  org.gradle.api.execution.TaskExecutionGraph.beforeTask(Closure)
  This method is not supported when configuration caching is enabled.
  org.gradle.api.execution.TaskExecutionGraph.beforeTask(Action<Task>)
  This method is not supported when configuration caching is enabled.
  org.gradle.api.execution.TaskExecutionGraph.removeTaskExecutionListener(TaskExecutionListener)
  This method is not supported when configuration caching is enabled.
  org.gradle.api.invocation.Gradle.buildFinished(Closure)
  This method is not supported when configuration caching is enabled.
  org.gradle.api.invocation.Gradle.buildFinished(Action<? super BuildResult>)
  This method is not supported when configuration caching is enabled.
  org.gradle.api.invocation.Gradle.useLogger(Object)
  Will be removed in Gradle 10. Logging customization through listeners is no longer supported.
  org.gradle.api.plugins.PluginCollection.add(T)
  Use `PluginManager.apply(Class)` instead.
  org.gradle.api.plugins.PluginCollection.addAll(Collection<? extends T>)
  Use `PluginManager.apply(Class)` instead.
  org.gradle.api.plugins.PluginCollection.clear()
  plugins cannot be removed.
  org.gradle.api.plugins.PluginCollection.remove(Object)
  plugins cannot be removed.
  org.gradle.api.plugins.PluginCollection.removeAll(Collection<?>)
  plugins cannot be removed.
  org.gradle.api.Project.getBuildDir()
  Use `getLayout().getBuildDirectory()` instead
  org.gradle.api.Project.setBuildDir(File)
  Use `getLayout().getBuildDirectory()` and set the `DirectoryProperty`
  org.gradle.api.Project.setBuildDir(Object)
  Use `getLayout().getBuildDirectory()` and set the `DirectoryProperty`
  org.gradle.api.Project.task(String)
  Use `tasks.register(String)` instead
  org.gradle.api.Project.task(String, Closure)
  Use `tasks.register(String, Action)` instead
  org.gradle.api.Project.task(String, Action<? super Task>)
  Use `tasks.register(String, Action)` instead
  org.gradle.api.Project.task(Map<String, ?>, String)
  Use a `tasks.register` variant instead
  org.gradle.api.Project.task(Map<String, ?>, String, Closure)
  Use a `tasks.register` variant instead
  org.gradle.api.reporting.ReportingExtension.file(String)
  Use `getBaseDirectory().file(path)` or `getBaseDirectory().dir(path)` instead.
  org.gradle.api.reporting.ReportingExtension.getApiDocTitle()
  Use your own way of generating a title for API documentation.
  org.gradle.api.tasks.diagnostics.BuildEnvironmentReportTask.getClientMetaData()
  org.gradle.api.tasks.diagnostics.DependencyInsightReportTask.getImmutableAttributesFactory()
  org.gradle.api.tasks.TaskContainer.create(String)
  Use `TaskContainer.register(String)` instead. See documentation for more information.
  org.gradle.api.tasks.TaskContainer.create(String, Closure)
  Use `TaskContainer.register(String, Action)` instead. See documentation for more information.
  org.gradle.api.tasks.TaskContainer.create(String, Class<T>)
  Use `TaskContainer.register(String, Class)` instead. See documentation for more information.
  org.gradle.api.tasks.TaskContainer.create(String, Class<T>, Object...)
  Use `TaskContainer.register(String, Class, Object...)` instead. See documentation for more information.
  org.gradle.api.tasks.TaskContainer.create(String, Class<T>, Action<? super T>)
  Use `TaskContainer.register(String, Class, Action)` instead. See documentation for more information.
  org.gradle.api.tasks.TaskContainer.create(String, Action<? super Task>)
  Use `TaskContainer.register(String, Action)` instead. See documentation for more information.
  org.gradle.api.tasks.TaskContainer.create(Map<String, ?>)
  Use `TaskContainer.register(String, Action)` or `TaskContainer.register(String, Class, Action)` instead. See documentation for more information.
  org.gradle.api.tasks.TaskContainer.create(Map<String, ?>, Closure)
  Use `TaskContainer.register(String, Action)` instead. See documentation for more information.
  org.gradle.BuildAdapter.buildFinished(BuildResult)
  org.gradle.BuildListener.buildFinished(BuildResult)
  This method is not supported when configuration caching is enabled.
  org.gradle.StartParameter.isConfigurationCacheRequested()
  Use `Configuration Cache build feature` instead.