docs.gradle.org

org.gradle.api.artifacts.Configuration.getUploadTaskName() org.gradle.api.artifacts.DependencySubstitutions.Substitution.with​(ComponentSelector)

Use DependencySubstitutions.Substitution.using(ComponentSelector) instead. This method will be removed in Gradle 8.0.

org.gradle.api.artifacts.dsl.DependencyHandler.registerTransform​(Action<? super VariantTransform>)

use DependencyHandler.registerTransform(Class, Action) instead.

org.gradle.api.artifacts.dsl.RepositoryHandler.jcenter​(Action<? super MavenArtifactRepository>)

JFrog announced JCenter's sunset in February 2021. Use RepositoryHandler.mavenCentral() instead.

org.gradle.api.artifacts.ExternalDependency.setForce​(boolean)

Use instead.

org.gradle.api.artifacts.result.ResolvedComponentResult.getVariant()

Use ResolvedComponentResult.getVariants() instead}

org.gradle.api.artifacts.VersionCatalog.findDependency​(String)

For consistency, this has been renamed to VersionCatalog.findLibrary(String).

org.gradle.api.artifacts.VersionCatalog.getDependencyAliases()

For consistency, this has been renamed to VersionCatalog.getLibraryAliases().

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.beforeTask​(Closure)

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.file.SourceDirectorySet.getOutputDir()

Use SourceDirectorySet.getClassesDirectory() instead. This method will be removed in Gradle 8.0.

org.gradle.api.file.SourceDirectorySet.setOutputDir​(Provider<File>)

Use SourceDirectorySet.getDestinationDirectory().set() instead. This method will be removed in Gradle 8.0.

org.gradle.api.initialization.dsl.VersionCatalogBuilder.alias​(String)

Use VersionCatalogBuilder.library(String, String, String), VersionCatalogBuilder.library(String, String) and VersionCatalogBuilder.plugin(String, String) instead. Will be removed in Gradle 8.

org.gradle.api.invocation.Gradle.buildFinished​(Closure)

This method is not supported when configuration caching is enabled.

org.gradle.api.plugins.BasePluginExtension.getArchivesBaseName()

Use BasePluginExtension.getArchivesName(). This method is scheduled for removal in Gradle 8.0.

org.gradle.api.plugins.BasePluginExtension.getDistsDirName()

Use BasePluginExtension.getDistsDirectory(). This method is scheduled for removal in Gradle 8.0.

org.gradle.api.plugins.BasePluginExtension.getLibsDirName()

Use BasePluginExtension.getLibsDirectory(). This method is scheduled for removal in Gradle 8.0.

org.gradle.api.plugins.BasePluginExtension.setArchivesBaseName​(String)

Use BasePluginExtension.getArchivesName(). This method is scheduled for removal in Gradle 8.0.

org.gradle.api.plugins.BasePluginExtension.setDistsDirName​(String)

Use BasePluginExtension.getDistsDirectory(). This method is scheduled for removal in Gradle 8.0.

org.gradle.api.plugins.BasePluginExtension.setLibsDirName​(String)

Use BasePluginExtension.getLibsDirectory(). This method is scheduled for removal in Gradle 8.0.

org.gradle.api.plugins.JavaApplication.getMainClassName()

Use JavaApplication.getMainClass() instead.

org.gradle.api.plugins.JavaApplication.setMainClassName​(String)

Set via JavaApplication.getMainClass() instead.

org.gradle.api.plugins.JavaBasePlugin.getJavaToolchainQueryService() 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.plugins.quality.Checkstyle.getAntBuilder() org.gradle.api.Project.getConvention()

The concept of conventions is deprecated. Use extensions if possible.

org.gradle.api.provider.Provider.forUseAtConfigurationTime() org.gradle.api.reporting.ConfigurableReport.setDestination​(File)

Use Report.getOutputLocation().set() instead. This method will be removed in Gradle 8.0.

org.gradle.api.reporting.ConfigurableReport.setEnabled​(boolean)

Use Report.getRequired().set() instead. This method will be removed in Gradle 8.0.

org.gradle.api.reporting.Report.getDestination()

Use Report.getOutputLocation() instead. This method will be removed in Gradle 8.0.

org.gradle.api.reporting.Report.isEnabled()

Use Report.getRequired() instead. This method will be removed in Gradle 8.0.

org.gradle.api.reporting.Report.setEnabled​(boolean)

Use Report.getRequired().set() instead. This method will be removed in Gradle 8.0.

org.gradle.api.Task.getConvention()

The concept of conventions is deprecated. Use extensions if possible.

org.gradle.api.tasks.AbstractExecTask.getExecResult()

Use AbstractExecTask.getExecutionResult() instead. This method will be removed in Gradle 8.0.

org.gradle.api.tasks.bundling.AbstractArchiveTask.getAppendix()

Use AbstractArchiveTask.getArchiveAppendix()

org.gradle.api.tasks.bundling.AbstractArchiveTask.getArchiveName()

Use AbstractArchiveTask.getArchiveFileName()

org.gradle.api.tasks.bundling.AbstractArchiveTask.getArchivePath()

Use AbstractArchiveTask.getArchiveFile()

org.gradle.api.tasks.bundling.AbstractArchiveTask.getBaseName()

Use AbstractArchiveTask.getArchiveBaseName()

org.gradle.api.tasks.bundling.AbstractArchiveTask.getClassifier()

Use AbstractArchiveTask.getArchiveClassifier()

org.gradle.api.tasks.bundling.AbstractArchiveTask.getDestinationDir()

Use AbstractArchiveTask.getDestinationDirectory()

org.gradle.api.tasks.bundling.AbstractArchiveTask.getExtension()

Use AbstractArchiveTask.getArchiveExtension()

org.gradle.api.tasks.bundling.AbstractArchiveTask.getVersion()

Use AbstractArchiveTask.getArchiveVersion()

org.gradle.api.tasks.bundling.AbstractArchiveTask.setAppendix​(String)

Use AbstractArchiveTask.getArchiveAppendix()

org.gradle.api.tasks.bundling.AbstractArchiveTask.setArchiveName​(String)

Use AbstractArchiveTask.getArchiveFileName()

org.gradle.api.tasks.bundling.AbstractArchiveTask.setBaseName​(String)

Use AbstractArchiveTask.getArchiveBaseName()

org.gradle.api.tasks.bundling.AbstractArchiveTask.setClassifier​(String)

Use AbstractArchiveTask.getArchiveClassifier()

org.gradle.api.tasks.bundling.AbstractArchiveTask.setDestinationDir​(File)

Use AbstractArchiveTask.getDestinationDirectory()

org.gradle.api.tasks.bundling.AbstractArchiveTask.setExtension​(String)

Use AbstractArchiveTask.getArchiveExtension()

org.gradle.api.tasks.bundling.AbstractArchiveTask.setVersion​(String)

Use AbstractArchiveTask.getArchiveVersion()

org.gradle.api.tasks.compile.AbstractCompile.getDestinationDir()

Use AbstractCompile.getDestinationDirectory() instead. This method will be removed in Gradle 8.0.

org.gradle.api.tasks.compile.AbstractCompile.setDestinationDir​(File)

Use AbstractCompile.getDestinationDirectory().set() instead. This method will be removed in Gradle 8.0.

org.gradle.api.tasks.compile.CompileOptions.getAnnotationProcessorGeneratedSourcesDirectory()

Use CompileOptions.getGeneratedSourceOutputDirectory() instead. This method will be removed in Gradle 8.0.

org.gradle.api.tasks.compile.CompileOptions.setAnnotationProcessorGeneratedSourcesDirectory​(File)

Use CompileOptions.getGeneratedSourceOutputDirectory().set() instead. This method will be removed in Gradle 8.0.

org.gradle.api.tasks.diagnostics.DependencyInsightReportTask.setLegacyShowSinglePathToDependency​(boolean)

should not be used, call DependencyInsightReportTask.setShowSinglePathToDependency(boolean) instead

org.gradle.api.tasks.GradleBuild.getBuildFile()

Use GradleBuild.getDir() instead to get the root of the nested build. This method will be removed in Gradle 8.0.

org.gradle.api.tasks.GradleBuild.setBuildFile​(File)

Use GradleBuild.setDir(File) instead to set the root of the nested build. This method will be removed in Gradle 8.0.

org.gradle.api.tasks.javadoc.Groovydoc.isIncludePrivate()

Equivalent to calling Groovydoc.getAccess().get() and checking for equivalence with GroovydocAccess.PRIVATE

org.gradle.api.tasks.javadoc.Groovydoc.setIncludePrivate​(boolean)

Equivalent to calling Groovydoc.getAccess().set(...) with GroovydocAccess.PRIVATE if includePrivate is true, GroovydocAccess.PUBLIC otherwise

org.gradle.api.tasks.JavaExec.getMain() org.gradle.api.tasks.JavaExec.setMain​(String) org.gradle.api.tasks.testing.AbstractTestTask.getBinResultsDir()

Use AbstractTestTask.getBinaryResultsDirectory() instead. This method will be removed in Gradle 8.0.

org.gradle.api.tasks.testing.AbstractTestTask.setBinResultsDir​(File)

Use AbstractTestTask.getBinaryResultsDirectory().set() instead. This method will be removed in Gradle 8.0.

org.gradle.api.tasks.testing.TestReport.getDestinationDir() org.gradle.api.tasks.testing.TestReport.getTestResultDirs() org.gradle.api.tasks.testing.TestReport.reportOn​(Object...) org.gradle.api.tasks.testing.TestReport.setDestinationDir​(File) org.gradle.api.tasks.testing.TestReport.setTestResultDirs​(Iterable<File>) org.gradle.BuildAdapter.buildFinished​(BuildResult) org.gradle.BuildListener.buildFinished​(BuildResult)

This method is not supported when configuration caching is enabled.

org.gradle.jvm.application.tasks.CreateStartScripts.getMainClassName() org.gradle.jvm.application.tasks.CreateStartScripts.setMainClassName​(String) org.gradle.plugins.ide.idea.model.IdeaModule.getTestResourceDirs() org.gradle.plugins.ide.idea.model.IdeaModule.getTestSourceDirs() org.gradle.plugins.ide.idea.model.IdeaModule.setTestResourceDirs​(Set<File>) org.gradle.plugins.ide.idea.model.IdeaModule.setTestSourceDirs​(Set<File>) org.gradle.process.JavaExecSpec.getMain()

Use JavaExecSpec.getMainClass() instead. This method will be removed in Gradle 8.0.

org.gradle.process.JavaExecSpec.setMain​(String)

Use JavaExecSpec.getMainClass().set(main) instead. This method will be removed in Gradle 8.0.

org.gradle.StartParameter.getBuildFile()

Setting custom build file to select the default project has been deprecated. This method will be removed in Gradle 8.0.

org.gradle.StartParameter.getSettingsFile()

Setting custom build file to select the default project has been deprecated. This method will be removed in Gradle 8.0.

org.gradle.StartParameter.setBuildFile​(File)

Setting custom build file to select the default project has been deprecated. Please use StartParameter.setProjectDir(File) to specify the directory of the default project instead. This method will be removed in Gradle 8.0.

org.gradle.StartParameter.setSettingsFile​(File)

Setting custom settings file for the build has been deprecated. Please use StartParameter.setProjectDir(File) to specify the directory of the default project instead. This method will be removed in Gradle 8.0.

org.gradle.testing.jacoco.plugins.JacocoPluginExtension.getReportsDir() org.gradle.testing.jacoco.plugins.JacocoPluginExtension.setReportsDir​(Provider<File>)

See JacocoPluginExtension.getReportsDirectory()

org.gradle.util.GradleVersion.getBuildTime()

will be removed in Gradle 9.

org.gradle.util.GradleVersion.getNextMajor()

will be removed in Gradle 9.

org.gradle.util.GradleVersion.getRevision()

will be removed in Gradle 9.

org.gradle.util.GradleVersion.isValid()

will be removed in Gradle 9.

org.gradle.util.GUtil.addToCollection​(T, boolean, Iterable<? extends V>...) org.gradle.workers.WorkerExecutor.submit​(Class<? extends Runnable>, Action<? super WorkerConfiguration>)

Read the original on docs.gradle.org ↗