# 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.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.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.