api / org.gradle.api / Buildable


interface Buildable

A Buildable represents an artifact or set of artifacts which are built by one or more Task instances.



abstract fun getBuildDependencies(): TaskDependency

Returns a dependency which contains the tasks which build this artifact. All Buildable implementations must ensure that the returned dependency object is live, so that it tracks changes to the dependencies of this buildable.



interface BuildableComponentSpec : Buildable, ComponentSpec

A ComponentSpec that is directly Buildable via a specified task.


interface Classpath : Buildable

A collection of files to be used as a class path.


interface ConfigurableFileTree : FileTree, DirectoryTree, PatternFilterable, Buildable

A FileTree with a single base directory, which can be configured and modified.

You can obtain a ConfigurableFileTree instance by calling org.gradle.api.Project#fileTree(java.util.Map).


interface DependencySet : DomainObjectSet<Dependency>, Buildable

A set of artifact dependencies.


interface FileCollection : MutableIterable<File>, AntBuilderAware, Buildable

A FileCollection represents a collection of files which you can query in certain ways. A file collection is often used to define a classpath, or to add files to a container.

You can obtain a FileCollection instance using org.gradle.api.Project#files.


interface PublicationArtifact : Buildable

An artifact published as part of a Publication.


interface PublishArtifact : Buildable

A PublishArtifact is an artifact produced by a project.


interface PublishArtifactSet : DomainObjectSet<PublishArtifact>, Buildable

A set of artifacts to be published.


interface SelfResolvingDependency : Dependency, Buildable

A SelfResolvingDependency is a Dependency which is able to resolve itself, independent of a repository.


interface TextResource : Buildable

A read-only body of text backed by a string, file, archive entry, or other source. To create a text resource, use one of the factory methods in TextResourceFactory (e.g. project.resources.text.fromFile(myFile)).


interface VisualStudioProject : Named, Buildable

A visual studio project, created from one or more native binaries.

The content and location of the generate project file can be modified by the supplied methods:

 apply plugin: "cpp" apply plugin: "visual-studio" model { visualStudio { projects.all { projectFile.location = "vs/${name}.vcxproj" projectFile.withXml { asNode().appendNode('PropertyGroup', [Label: 'Custom']) .appendNode('ProjectDetails', "Project is named ${project.name}") } } } } 


interface VisualStudioSolution : Named, Buildable, IdeWorkspace

A visual studio solution, representing one or more native binaries in a build.

The content and location of the generate solution file can be modified by the supplied methods:

 apply plugin: "visual-studio" model { visualStudio { solution { solutionFile.location = "vs/${name}.sln" solutionFile.withContent { TextProvider content -> content.asBuilder().insert(0, "# GENERATED FILE: DO NOT EDIT\n") content.text = content.text.replaceAll("HideSolutionNode = FALSE", "HideSolutionNode = TRUE") } } } }