# Deprecated API

## Contents

- Deprecated Packages
- Deprecated Interfaces
- Deprecated Classes
- Deprecated Annotation Types
- Deprecated Fields
- Deprecated Methods
- Deprecated Constructors

- Deprecated Packages
  Package and Description
  org.gradle.api.dsl This package will be removed in Gradle 5.0.

- Deprecated Interfaces
  Interface and Description
  org.gradle.api.tasks.CompatibilityAdapterForTaskInputs The interface is only here to allow plugins built against Gradle 2.x to run and it will be removed in Gradle 5.0.
  org.gradle.api.tasks.CompatibilityAdapterForTaskOutputs The interface is only here to allow plugins built against Gradle 2.x to run and it will be removed in Gradle 5.0.
  org.gradle.api.tasks.compile.CompilerArgumentProvider Use `CommandLineArgumentProvider` directly.
  org.gradle.api.file.DirectoryVar Use `DirectoryProperty` instead.
  org.gradle.api.provider.PropertyState Use `Property` instead.
  org.gradle.api.file.RegularFileVar Use `RegularFileProperty` instead.

- Deprecated Classes
  Class and Description
  org.gradle.api.dsl.ConventionProperty This class will be removed in Gradle 5.0.

- Deprecated Annotation Types
  Annotation Type and Description
  org.gradle.api.Nullable Use `Nullable` instead.

- Deprecated Fields
  Field and Description
  org.gradle.api.plugins.JavaPlugin.COMPILE_CONFIGURATION_NAME Users should prefer `JavaPlugin.API_CONFIGURATION_NAME` or `JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME`.
  org.gradle.api.plugins.JavaPlugin.RUNTIME_CONFIGURATION_NAME Consumers should use `JavaPlugin.RUNTIME_ELEMENTS_CONFIGURATION_NAME` instead.
  org.gradle.api.plugins.JavaPlugin.TEST_RUNTIME_CONFIGURATION_NAME Use `JavaPlugin.TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME` instead.

- Deprecated Methods
  Method and Description
  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.JavaBasePlugin.configureForSourceSet(SourceSet, AbstractCompile)
  org.gradle.api.Task.dependsOnTaskDidWork() Build logic should not depend on this information about a task. Instead, declare task inputs and outputs to allow Gradle to optimize task execution.
  org.gradle.api.tasks.TaskInputPropertyBuilder.dir(Object) Use `TaskInputs.dir(Object)` directly instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.dir(Object) Use `TaskInputs.dir(Object)` directly instead.
  org.gradle.api.tasks.TaskOutputFilePropertyBuilder.dir(Object) Use `TaskOutputs.dir(Object)` instead.
  org.gradle.api.tasks.TaskDestroyables.file(Object) Use `TaskDestroyables.register(Object...)` instead.
  org.gradle.api.tasks.TaskInputPropertyBuilder.file(Object) Use `TaskInputs.file(Object)` directly instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.file(Object) Use `TaskInputs.file(Object)` directly instead.
  org.gradle.api.tasks.TaskOutputFilePropertyBuilder.file(Object) Use `TaskOutputs.file(Object)` instead.
  org.gradle.api.tasks.TaskDestroyables.files(Object...) Use `TaskDestroyables.register(Object...)` instead.
  org.gradle.api.tasks.TaskInputPropertyBuilder.files(Object...) Use `TaskInputs.files(Object...)` directly instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.files(Object...) Use `TaskInputs.files(Object...)` directly instead.
  org.gradle.api.tasks.TaskOutputFilePropertyBuilder.files(Object...) Use `TaskOutputs.files(Object...)` instead.
  org.gradle.api.tasks.compile.CompileOptions.getBootClasspath() Use `CompileOptions.getBootstrapClasspath()` instead.
  org.gradle.api.plugins.quality.JDepend.getClassesDir() Replaced by `JDepend.getClassesDirs()`.
  org.gradle.api.tasks.SourceSetOutput.getClassesDir() Use `SourceSetOutput.getClassesDirs()` or `SourceDirectorySet.getOutputDir()`
  org.gradle.tooling.model.idea.IdeaModuleDependency.getDependencyModule()
  org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription() Use `ComponentSelectionReason.getDescriptions()` instead
  org.gradle.nativeplatform.tasks.InstallExecutable.getDestinationDir() Use `InstallExecutable.getInstallDirectory()`.
  org.gradle.nativeplatform.tasks.InstallExecutable.getExecutable() Use `InstallExecutable.getSourceFile()`.
  org.gradle.api.tasks.TaskInputPropertyBuilder.getFiles() Use `TaskInputs.getFiles()` directly instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.getFiles() Use `TaskInputs.getFiles()` directly instead.
  org.gradle.api.tasks.TaskOutputFilePropertyBuilder.getFiles() Use `TaskOutputs.getFiles()` instead.
  org.gradle.api.tasks.TaskInputPropertyBuilder.getHasInputs() Use `TaskInputs.getHasInputs()` directly instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.getHasInputs() Use `TaskInputs.getHasInputs()` directly instead.
  org.gradle.api.tasks.TaskOutputFilePropertyBuilder.getHasOutput() Use `TaskOutputs.getHasOutput()` instead.
  org.gradle.api.tasks.TaskInputPropertyBuilder.getHasSourceFiles() Use `TaskInputs.getHasSourceFiles()` directly instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.getHasSourceFiles() Use `TaskInputs.getHasSourceFiles()` directly instead.
  org.gradle.api.tasks.TaskInputPropertyBuilder.getProperties() Use `TaskInputs.getProperties()` directly instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.getProperties() Use `TaskInputs.getProperties()` directly instead.
  org.gradle.api.plugins.ExtensionContainer.getSchema()
  org.gradle.api.tasks.TaskInputPropertyBuilder.getSourceFiles() Use `TaskInputs.getSourceFiles()` directly instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.getSourceFiles() Use `TaskInputs.getSourceFiles()` directly instead.
  org.gradle.api.tasks.scala.ScalaDocOptions.getStyleSheet() Scaladoc does not support to set a stylesheet any more (Scala 2.11).
  org.gradle.tooling.model.eclipse.EclipseProjectDependency.getTargetProject()
  org.gradle.caching.local.DirectoryBuildCache.getTargetSizeInMB() Use `DirectoryBuildCache.getRemoveUnusedEntriesAfterDays()` instead.
  org.gradle.api.tasks.testing.Test.getTestClassesDir() Use `Test.getTestClassesDirs()`.
  org.gradle.api.Task.leftShift(Closure) Use `Task.doLast(Closure action)`
  org.gradle.api.file.ProjectLayout.newDirectoryVar() Use `ProjectLayout.directoryProperty()` instead.
  org.gradle.api.file.ProjectLayout.newFileVar() Use `ProjectLayout.fileProperty()` instead.
  org.gradle.plugins.ide.idea.IdeaPlugin.performPostEvaluationActions()
  org.gradle.plugins.ide.eclipse.EclipsePlugin.performPostEvaluationActions()
  org.gradle.api.tasks.TaskInputPropertyBuilder.properties(Map<String, ?>) Use `TaskInputs.properties(Map)` directly instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.properties(Map<String, ?>) Use `TaskInputs.properties(Map)` directly instead.
  org.gradle.api.provider.ProviderFactory.property(Class<T>) Use `ObjectFactory.property(Class)` instead.
  org.gradle.api.Project.property(Class<T>) Use `ObjectFactory.property(Class)` instead.
  org.gradle.api.Script.property(Class<T>) Use `ObjectFactory.property(Class)` instead.
  org.gradle.api.tasks.TaskInputPropertyBuilder.property(String, Object) Use `TaskInputs.property(String, Object)` directly instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.property(String, Object) Use `TaskInputs.property(String, Object)` directly instead.
  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.tasks.compile.CompileOptions.setBootClasspath(String) Use `CompileOptions.setBootstrapClasspath(FileCollection)` instead.
  org.gradle.api.plugins.quality.JDepend.setClassesDir(File) Replaced by `JDepend.getClassesDirs()`.
  org.gradle.api.tasks.SourceSetOutput.setClassesDir(File) Set the output directory for the particular `AbstractCompile` task
  org.gradle.api.tasks.SourceSetOutput.setClassesDir(Object) Set the output directory for the particular `AbstractCompile` task
  org.gradle.api.reporting.ConfigurableReport.setDestination(Object) Replaced by `ConfigurableReport.setDestination(java.io.File)` and `ConfigurableReport.setDestination(org.gradle.api.provider.Provider)`.
  org.gradle.nativeplatform.tasks.InstallExecutable.setDestinationDir(File) Use `InstallExecutable.getInstallDirectory()`.
  org.gradle.nativeplatform.tasks.InstallExecutable.setExecutable(File) Use `InstallExecutable.getSourceFile()`.
  org.gradle.api.tasks.scala.ScalaDocOptions.setStyleSheet(File) Scaladoc does not support to set a stylesheet any more (Scala 2.11).
  org.gradle.caching.local.DirectoryBuildCache.setTargetSizeInMB(long) Use `DirectoryBuildCache.setRemoveUnusedEntriesAfterDays(int)` instead.
  org.gradle.api.tasks.testing.Test.setTestClassesDir(File) Use `Test.setTestClassesDirs(FileCollection)`.
  org.gradle.api.tasks.TaskOutputFilePropertyBuilder.upToDateWhen(Closure) Use `TaskOutputs.upToDateWhen(Closure)` instead.
  org.gradle.api.tasks.TaskOutputFilePropertyBuilder.upToDateWhen(Spec<? super Task>) Use `TaskOutputs.upToDateWhen(Spec)` instead.

- Deprecated Constructors
  Constructor and Description
  org.gradle.plugins.ear.EarPluginConvention(FileResolver, Instantiator) Use public `ObjectFactory` constructor instead of this one using internal `Instantiator`.