# 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.plugins.DeferredConfigurable without replacement.
  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.file.FileCollection.add(FileCollection) Use `ConfigurableFileCollection.from(Object...)` instead. You can create configurable file collections via `Project.files(Object...)`.
  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.file.FileCollection.asType(Class<?>) This method will be removed in Gradle 5.0. Type conversions with the Groovy `as` keyword will keep working for the collection types. For other conversions use `FileCollection.getSingleFile()` and `FileCollection.getAsFileTree()`.
  org.gradle.api.plugins.PluginCollection.clear() plugins cannot be removed.
  org.gradle.api.plugins.JavaBasePlugin.configureForSourceSet(SourceSet, AbstractCompile)
  org.gradle.api.Task.deleteAllActions() Don't use this.
  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.TaskOutputFilePropertyBuilder.dir(Object) Use `TaskOutputs.dir(Object)` instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.dir(Object) Use `TaskInputs.dir(Object)` directly instead.
  org.gradle.api.tasks.TaskInputPropertyBuilder.file(Object) Use `TaskInputs.file(Object)` directly instead.
  org.gradle.api.tasks.TaskDestroyables.file(Object) Use `TaskDestroyables.register(Object...)` instead.
  org.gradle.api.tasks.TaskOutputFilePropertyBuilder.file(Object) Use `TaskOutputs.file(Object)` instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.file(Object) Use `TaskInputs.file(Object)` directly instead.
  org.gradle.api.tasks.TaskInputPropertyBuilder.files(Object...) Use `TaskInputs.files(Object...)` directly instead.
  org.gradle.api.tasks.TaskDestroyables.files(Object...) Use `TaskDestroyables.register(Object...)` instead.
  org.gradle.api.tasks.TaskOutputFilePropertyBuilder.files(Object...) Use `TaskOutputs.files(Object...)` instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.files(Object...) Use `TaskInputs.files(Object...)` directly 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.api.tasks.TaskInputPropertyBuilder.getFiles() Use `TaskInputs.getFiles()` directly instead.
  org.gradle.api.tasks.TaskOutputFilePropertyBuilder.getFiles() Use `TaskOutputs.getFiles()` instead.
  org.gradle.api.tasks.TaskInputFilePropertyBuilder.getFiles() Use `TaskInputs.getFiles()` directly instead.
  org.gradle.tooling.model.idea.IdeaContentRoot.getGeneratedSourceDirectories() Use `IdeaContentRoot.getSourceDirectories()` in combination with `IdeaSourceDirectory.isGenerated()` instead.
  org.gradle.tooling.model.idea.IdeaContentRoot.getGeneratedTestDirectories() Use `IdeaContentRoot.getTestDirectories()` in combination with `IdeaSourceDirectory.isGenerated()` 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.plugins.signing.Signature.getToSignArtifact() do not use; should have been internal
  org.gradle.api.plugins.ExtensionsSchema.ExtensionSchema.isDeferredConfigurable() without replacement.
  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.Project.property(Class<T>) Use `ObjectFactory.property(Class)` instead.
  org.gradle.api.Script.property(Class<T>) Use `ObjectFactory.property(Class)` instead.
  org.gradle.api.provider.ProviderFactory.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.plugins.signing.Signature.setFile(File) changing the output file is not supported.
  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.file.FileCollection.stopExecutionIfEmpty() You can use @`SkipWhenEmpty` on a `FileCollection` property, or throw a `StopExecutionException` in your code manually instead.
  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.api.plugins.ApplicationPluginConvention(Project) Creating instances of this class is deprecated. These should be created by the application plugin only.
  org.gradle.api.plugins.BasePluginConvention(Project) Creating instances of this class is deprecated. These should be created by the base plugin only.
  org.gradle.plugins.ear.EarPluginConvention(FileResolver, Instantiator) Creating instances of this class is deprecated. These should be created by the EAR plugin only.
  org.gradle.plugins.ear.EarPluginConvention(FileResolver, ObjectFactory) Creating instances of this class is deprecated. These should be created by the EAR plugin only.
  org.gradle.api.plugins.JavaPluginConvention(ProjectInternal, Instantiator) Creating instances of this class is deprecated. These should be created by the Java base plugin only.
  org.gradle.api.plugins.osgi.OsgiPluginConvention(ProjectInternal) Creating instances of this class is deprecated. These should be created by the OSGi plugin only.
  org.gradle.api.plugins.ProjectReportsPluginConvention(Project) Creating instances of this class is deprecated. These should be created by the reporting base plugin only.
  org.gradle.api.plugins.WarPluginConvention(Project) Creating instances of this class is deprecated. These should be created by the WAR plugin only.