api / org.gradle.api / Named

Named

interface Named

Types can implement this interface and use the embedded Namer implementation, to satisfy API that calls for a namer.

Types

Namer

open class Namer : Namer<Named>

An implementation of the namer interface for objects implementing the named interface.

Functions

getName

abstract fun getName(): String

The object's name.

Must be constant for the life of the object.

Inheritors

Architecture

interface Architecture : Named

A cpu architecture. Instruction Set 32-bit names 64-bit names Intel x86 "x86", "i386", "ia-32", "i686" "x86_64", "amd64", "x64", "x86-64" Intel Itanium N/A "ia-64", "ia64" Power PC "ppc" "ppc64" Sparc "sparc", "sparc32", "sparc-v8" "sparc64", "ultrasparc", "sparc-v9" ARM "arm", "arm-v7", "armv7", "arm32" "arm64", "arm-v8"

ArtifactTypeDefinition

interface ArtifactTypeDefinition : HasAttributes, Named

Meta-data about a particular type of artifacts.

Attribute

open class Attribute<T : Any> : Named

An attribute is a named entity with a type. It is used in conjunction with a AttributeContainer to provide a type safe container for attributes. This class isn't intended to store the value of an attribute, but only represent the identity of the attribute. It means that an attribute must be immutable and can potentially be pooled. Attributes can be created using the factory method.

Authentication

interface Authentication : Named

Base interface for transport authentication schemes.

BuildType

interface BuildType : Named

Specifies a build-type for a native binary. Common build types are 'debug' and 'release', but others may be defined.

ConfigurationVariant

interface ConfigurationVariant : Named, HasConfigurableAttributes<ConfigurationVariant>

Represents some variant of an outgoing configuration.

Distribution

interface Distribution : Named

A distribution allow to bundle an application or a library including dependencies,sources...

Flavor

interface Flavor : Named

Defines a custom variant that differentiate a NativeBinary.

IvyConfiguration

interface IvyConfiguration : Named

A configuration included in an IvyPublication, which will be published in the ivy descriptor file generated.

Linkage

class Linkage : Named

Specify how a native library should be linked into another binary.

LocalJava

interface LocalJava : Named

A local JDK, JRE or Java 9+ installation.

ModelElement

interface ModelElement : Named

Represents an element in a model. Elements are arranged in a hierarchy.

OperatingSystem

interface OperatingSystem : Named

A machine operating system. Operating System Aliases Windows "windows" GNU/Linux "linux" MacOS "osx", "mac os x", "darwin" Solaris "solaris", "sunos"

OperatingSystemFamily

abstract class OperatingSystemFamily : Named

Represents the operating system of a configuration. Typical operating system include Windows, Linux, and macOS. This interface allows the user to customize operating systems by implementing this interface.

Platform

interface Platform : Named

The platform or runtime that a binary is designed to run on. Examples: the JvmPlatform defines a java runtime, while the NativePlatform defines the Operating System and Architecture for a native app.

PluginDeclaration

open class PluginDeclaration : Named, Serializable

Describes a Gradle plugin under development.

PrebuiltLibrary

interface PrebuiltLibrary : Named, NativeLibrary

A library component that is not built by gradle.

Product

interface Product : Named

A product in a Swift Package Manager package.

Publication

interface Publication : Named

A publication is a description of a consumable representation of one or more artifacts, and possibly associated metadata.

SoftwareComponent

interface SoftwareComponent : Named

A software component produced by a Gradle software project.

An implementation of this interface may also implement:

  • ComponentWithVariants to provide information about the variants that the component provides.

SourceDirectorySet

interface SourceDirectorySet : FileTree, PatternFilterable, Named, Describable

A SourceDirectorySet represents a set of source files composed from a set of source directories, along with associated include and exclude patterns.

SourceDirectorySet extends FileTree. The contents of the file tree represent the source files of this set, arranged in a hierarchy. The file tree is live and reflects changes to the source directories and their contents.

TaskReference

interface TaskReference : Named

A lightweight reference to a task.

ToolChain

interface ToolChain : Named

A set of compilers that are used together to construct binaries.

Usage

interface Usage : Named

Represents the usage of a configuration. Typical usages include compilation or runtime. This interface allows the user to customize usages by implementing this interface.

VisualStudioProject

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}") } } } } 

VisualStudioSolution

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") } } } }