# 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.ComponentSelectionRules.all(Object)
  use `ComponentSelectionRules.all(Action)` instead.
  org.gradle.api.artifacts.ComponentSelectionRules.withModule(Object, Object)
  use `ComponentSelectionRules.withModule(Object,Action)` instead.
  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.ComponentMetadataHandler.all(Object)
  Use `ComponentMetadataHandler.all(Action)` or `ComponentMetadataHandler.all(Class)` instead.
  org.gradle.api.artifacts.dsl.ComponentMetadataHandler.withModule(Object, Object)
  Use `ComponentMetadataHandler.withModule(Object, Action)` or `ComponentMetadataHandler.withModule(Object, Class)` 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.getProject()
  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.DomainObjectCollection.findAll(Closure)
  Use `DomainObjectCollection.matching(Spec)` or Collection APIs from the JDK.
  org.gradle.api.DomainObjectSet.findAll(Closure)
  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.NamedDomainObjectList.findAll(Closure)
  org.gradle.api.NamedDomainObjectSet.findAll(Closure)
  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.container(Class<T>)
  Use `ObjectFactory.domainObjectContainer(Class)` instead.
  org.gradle.api.Project.container(Class<T>, Closure)
  Use `ObjectFactory.domainObjectContainer(Class, NamedDomainObjectFactory)` instead.
  org.gradle.api.Project.container(Class<T>, NamedDomainObjectFactory<T>)
  Use `ObjectFactory.domainObjectContainer(Class, NamedDomainObjectFactory)` instead.
  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.api.tasks.testing.AbstractTestTask.afterSuite(Closure)
  Replace with `AbstractTestTask.addTestListener(TestListener)` and a `TestListener`.
  org.gradle.api.tasks.testing.AbstractTestTask.afterTest(Closure)
  Replace with `AbstractTestTask.addTestListener(TestListener)` and a `TestListener`.
  org.gradle.api.tasks.testing.AbstractTestTask.beforeSuite(Closure)
  Replace with `AbstractTestTask.addTestListener(TestListener)` and a `TestListener`.
  org.gradle.api.tasks.testing.AbstractTestTask.beforeTest(Closure)
  Replace with `AbstractTestTask.addTestListener(TestListener)` and a `TestListener`.
  org.gradle.api.tasks.testing.AbstractTestTask.onOutput(Closure)
  Replace with `AbstractTestTask.addTestOutputListener(TestOutputListener)` and a `TestOutputListener`.
  org.gradle.api.tasks.testing.Test.testFramework(Closure)
  This will be removed in Gradle 10
  org.gradle.api.tasks.testing.TestReport.getBuildOperationExecutor()
  org.gradle.api.tasks.testing.TestReport.getBuildOperationRunner()
  org.gradle.api.tasks.testing.TestReport.getMetadataRendererRegistry()
  org.gradle.api.tasks.wrapper.Wrapper.getAvailableDistributionTypes()
  Since 9.3.0. Use `Wrapper.DistributionType.values()` directly instead.
  org.gradle.BuildAdapter.buildFinished(BuildResult)
  org.gradle.BuildListener.buildFinished(BuildResult)
  This method is not supported when configuration caching is enabled.
  org.gradle.process.JavaForkOptions.setAllJvmArgs(Iterable<?>)
  org.gradle.process.JavaForkOptions.setAllJvmArgs(List<String>)
  org.gradle.StartParameter.isConfigurationCacheRequested()
  Use `Configuration Cache build feature` instead.
  org.gradle.util.Path.getPath()
  use `Path.asString()` instead