# Deprecated API

## Contents

- Deprecated Interfaces
- Deprecated Classes
- Deprecated Enums
- Deprecated Exceptions
- Deprecated Fields
- Deprecated Methods

- Deprecated Interfaces
  Interface and Description
  org.gradle.api.tasks.ConventionValue Use `Closure` or `Callable` instead.
  org.gradle.tooling.model.eclipse.EclipseTask Use `EclipseProject.getGradleProject()` to determine the associated Gradle project for an Eclipse project, then use `GradleProject.getTasks()` to determine the tasks for the Gradle project.
  org.gradle.api.tasks.testing.TestLogging use `TestLogging` instead

- Deprecated Classes
  Class and Description
  org.gradle.api.tasks.compile.Compile This class has been replaced by `JavaCompile`.
  org.gradle.GradleLauncher Use the tooling API instead.
  org.gradle.RefreshOptions Use `StartParameter.setRefreshDependencies(boolean)` instead.
  org.gradle.api.plugins.ReportingBasePluginConvention This convention has been deprecated and replaced by `ReportingExtension`
  org.gradle.api.tasks.bundling.Zip.ZipCopyActionImpl

- Deprecated Enums
  Enum and Description
  org.gradle.CacheUsage This enum has been deprecated. Use `StartParameter.isRerunTasks()` and `StartParameter.isRecompileScripts()` instead.

- Deprecated Exceptions
  Exceptions and Description
  org.gradle.api.IllegalOperationAtExecutionTimeException No replacement

- Deprecated Fields
  Field and Description
  org.gradle.api.artifacts.ArtifactRepositoryContainer.DEFAULT_CACHE_ARTIFACT_PATTERN
  org.gradle.api.artifacts.ArtifactRepositoryContainer.DEFAULT_CACHE_IVY_PATTERN
  org.gradle.api.plugins.GroovyBasePlugin.GROOVY_CONFIGURATION_NAME Typically, usages of `groovy` can simply be replaced with `compile`. In some cases, it may be necessary to additionally configure the `groovyClasspath` property of `GroovyCompile` and `Groovydoc` tasks.
  org.gradle.api.artifacts.ArtifactRepositoryContainer.INTERNAL_REPOSITORY_NAME
  org.gradle.api.artifacts.ArtifactRepositoryContainer.MAVEN_REPO_PATTERN
  org.gradle.api.artifacts.ArtifactRepositoryContainer.RESOLVER_NAME
  org.gradle.api.artifacts.ArtifactRepositoryContainer.RESOLVER_URL

- Deprecated Methods
  Method and Description
  org.gradle.api.artifacts.ArtifactRepositoryContainer.add(DependencyResolver) Use one of the repository methods on `RepositoryHandler` or `ArtifactRepositoryContainer.add(ArtifactRepository)` instead.
  org.gradle.api.artifacts.ArtifactRepositoryContainer.add(DependencyResolver, Closure) Use one of the repository methods on `RepositoryHandler` or `ArtifactRepositoryContainer.add(ArtifactRepository)` instead.
  org.gradle.api.tasks.TaskContainer.add(Map) use `TaskContainer.create(java.util.Map)` instead
  org.gradle.api.tasks.TaskContainer.add(Map, Closure) use `TaskContainer.create(java.util.Map, groovy.lang.Closure)` instead
  org.gradle.api.tasks.TaskContainer.add(String) use `TaskContainer.create(String)` instead
  org.gradle.api.artifacts.ConfigurationContainer.add(String) use `NamedDomainObjectContainer.create(String)` instead
  org.gradle.api.tasks.SourceSetContainer.add(String) use `NamedDomainObjectContainer.create(String)` instead
  org.gradle.api.plugins.ExtensionContainer.add(String, Class, Object...) use `ExtensionContainer.create(java.lang.String, java.lang.Class<T>, java.lang.Object...)`
  org.gradle.api.tasks.TaskContainer.add(String, Class) use `TaskContainer.create(String, Class)` instead
  org.gradle.api.tasks.TaskContainer.add(String, Closure) use `TaskContainer.create(String, groovy.lang.Closure)` instead
  org.gradle.api.artifacts.ConfigurationContainer.add(String, Closure) use `NamedDomainObjectContainer.create(String, groovy.lang.Closure)` instead
  org.gradle.api.tasks.SourceSetContainer.add(String, Closure) use `NamedDomainObjectContainer.create(String, groovy.lang.Closure)` instead
  org.gradle.api.artifacts.ArtifactRepositoryContainer.addAfter(Object, String) No replacement
  org.gradle.api.artifacts.ArtifactRepositoryContainer.addAfter(Object, String, Closure) No replacement
  org.gradle.api.artifacts.ArtifactRepositoryContainer.addBefore(Object, String) No replacement
  org.gradle.api.artifacts.ArtifactRepositoryContainer.addBefore(Object, String, Closure) No replacement
  org.gradle.api.artifacts.ArtifactRepositoryContainer.addFirst(Object) Use `ArtifactRepositoryContainer.addFirst(ArtifactRepository)` instead.
  org.gradle.api.artifacts.ArtifactRepositoryContainer.addFirst(Object, Closure) Use `ArtifactRepositoryContainer.addFirst(ArtifactRepository)` instead.
  org.gradle.api.artifacts.ArtifactRepositoryContainer.addLast(Object) Use `RepositoryHandler.maven(groovy.lang.Closure)` or `ArtifactRepositoryContainer.add(ArtifactRepository)` instead.
  org.gradle.api.artifacts.ArtifactRepositoryContainer.addLast(Object, Closure) Use `RepositoryHandler.maven(groovy.lang.Closure)` or `ArtifactRepositoryContainer.add(ArtifactRepository)` instead.
  org.gradle.api.Project.childrenDependOnMe() Use `Task.dependsOn(Object...)` instead.
  org.gradle.GradleLauncher.createStartParameter(String...) No replacement.
  org.gradle.api.Project.dependsOn(String) Use `Task.dependsOn(Object...)` instead.
  org.gradle.api.Project.dependsOn(String, boolean) Use `Task.dependsOn(Object...)` instead.
  org.gradle.api.Project.dependsOnChildren() Use `Task.dependsOn(Object...)` instead.
  org.gradle.api.Project.dependsOnChildren(boolean) To definde task dependencies use `Task.dependsOn(Object...)` instead. For declaring evaluation dependencies to child projects, use evaluation dependencies use `Project.evaluationDependsOnChildren()`.
  org.gradle.api.tasks.testing.Test.disableTestReport() Replaced by `getReports().getHtml().setEnabled()`
  org.gradle.api.tasks.testing.Test.enableTestReport() Replaced by `getReports().getHtml().setEnabled()`
  org.gradle.api.Script.fileTree(Closure) Use `Script.fileTree(Object,Closure)` instead.
  org.gradle.api.Project.fileTree(Closure) Use `Project.fileTree(Object,Closure)` instead.
  org.gradle.api.plugins.ReportingBasePluginConvention.getApiDocTitle() use `ReportingExtension.getApiDocTitle()`
  org.gradle.StartParameter.getCacheUsage() Use `StartParameter.isRecompileScripts()` and/or `StartParameter.isRerunTasks()` instead.
  org.gradle.api.tasks.compile.CompileOptions.getCompiler() use `CompileOptions.forkOptions.executable` instead
  org.gradle.api.tasks.compile.CompileOptions.getDebug() use `CompileOptions.isDebug()`
  org.gradle.api.tasks.SourceTask.getDefaultSource() Use getSource() instead.
  org.gradle.api.tasks.AbstractCopyTask.getDefaultSource() Use getSource() instead.
  org.gradle.api.artifacts.ExcludeRule.getExcludeArgs() Use `ExcludeRule.getGroup()` or `ExcludeRule.getModule()` instead.
  org.gradle.api.tasks.bundling.Compression.getExtension() Use `Compression.getDefaultExtension()` instead.
  org.gradle.GradleLauncher.getFactory()
  org.gradle.api.tasks.compile.CompileOptions.getFailOnError() use `CompileOptions.isFailOnError()`
  org.gradle.api.artifacts.UnresolvedDependency.getId()
  org.gradle.api.tasks.compile.CompileOptions.getIncludeJavaRuntime() No replacement
  org.gradle.StartParameter.getMergedSystemProperties() No replacement
  org.gradle.api.tasks.compile.CompileOptions.getOptimize() No replacement
  org.gradle.StartParameter.getRefreshOptions() Use `StartParameter.isRefreshDependencies()` instead.
  org.gradle.api.plugins.ReportingBasePluginConvention.getReportsDir() use `ReportingExtension.getBaseDir()`
  org.gradle.api.plugins.ReportingBasePluginConvention.getReportsDirName() use `ReportingExtension.getBaseDir()`
  org.gradle.api.artifacts.ResolvedArtifact.getResolvedDependency() An artifact can belong to multiple dependencies. Use `ResolvedArtifact.getModuleVersion()` instead.
  org.gradle.api.artifacts.ArtifactRepositoryContainer.getResolvers() No replacement.
  org.gradle.api.tasks.scala.ScalaCompileOptions.getTargetCompatibility() use `AbstractCompile.getTargetCompatibility()` instead
  org.gradle.api.tasks.testing.Test.getTestReportDir() Replaced by `getReports().getHtml().getDestination()`
  org.gradle.api.tasks.testing.Test.getTestResultsDir() Replaced by `getReports().getJunitXml().getDestination()`
  org.gradle.GradleLauncher.injectCustomFactory(GradleLauncherFactory)
  org.gradle.api.tasks.compile.GroovyCompileOptions.isIncludeJavaRuntime() No replacement
  org.gradle.api.tasks.compile.CompileOptions.isIncludeJavaRuntime() No replacement
  org.gradle.StartParameter.isNoOpt() Use `StartParameter.isRerunTasks()` instead.
  org.gradle.api.tasks.compile.CompileOptions.isOptimize() No replacement
  org.gradle.api.tasks.compile.GroovyCompileOptions.isStacktrace() No replacement
  org.gradle.api.tasks.testing.Test.isTestReport() Replaced by `getReports().getHtml().isEnabled()`
  org.gradle.api.tasks.compile.GroovyCompileOptions.isUseAnt() No replacement
  org.gradle.api.tasks.compile.CompileOptions.isUseAnt() No replacement
  org.gradle.api.artifacts.dsl.RepositoryHandler.mavenRepo(Map) Use `RepositoryHandler.maven(groovy.lang.Closure)` instead.
  org.gradle.api.artifacts.dsl.RepositoryHandler.mavenRepo(Map, Closure) Use `RepositoryHandler.maven(groovy.lang.Closure)` instead.
  org.gradle.GradleLauncher.newInstance(StartParameter) Use the tooling API instead.
  org.gradle.GradleLauncher.newInstance(String...) Use the tooling API instead.
  org.gradle.StartParameter.setCacheUsage(CacheUsage) Use `StartParameter.setRecompileScripts(boolean)` and/or `StartParameter.setRerunTasks(boolean)` instead.
  org.gradle.api.tasks.compile.CompileOptions.setCompiler(String) use `CompileOptions.forkOptions.executable instead`
  org.gradle.api.tasks.compile.GroovyCompileOptions.setIncludeJavaRuntime(boolean) No replacement
  org.gradle.api.tasks.compile.CompileOptions.setIncludeJavaRuntime(boolean) No replacement
  org.gradle.StartParameter.setNoOpt(boolean) Use `StartParameter.setRerunTasks(boolean)` instead.
  org.gradle.api.tasks.compile.CompileOptions.setOptimize(boolean) No replacement
  org.gradle.StartParameter.setRefreshOptions(RefreshOptions) Use `StartParameter.setRefreshDependencies(boolean)` instead.
  org.gradle.api.plugins.ReportingBasePluginConvention.setReportsDirName(String) use `ReportingExtension.setBaseDir(Object)`
  org.gradle.api.tasks.compile.GroovyCompileOptions.setStacktrace(boolean) No replacement
  org.gradle.api.tasks.scala.ScalaCompileOptions.setTargetCompatibility(String) use `AbstractCompile.setTargetCompatibility(java.lang.String)` instead
  org.gradle.api.tasks.testing.Test.setTestReport(boolean) Replaced by `getReports().getHtml().setEnabled()`
  org.gradle.api.tasks.testing.Test.setTestReportDir(File) Replaced by `getReports().getHtml().setDestination()`
  org.gradle.api.tasks.testing.Test.setTestResultsDir(File) Replaced by `getReports().getJunitXml().setDestination()`
  org.gradle.api.tasks.compile.GroovyCompileOptions.setUseAnt(boolean) No replacement
  org.gradle.api.tasks.compile.CompileOptions.setUseAnt(boolean) No replacement
  org.gradle.StartParameter.useEmptySettingsScript() use `StartParameter.useEmptySettings()`