# BaseComponentSpec

@Incubating
open class BaseComponentSpec : DefaultComponentSpec, GeneralComponentSpec

### Deprecated

The Gradle software model is deprecated and will be removed in Gradle 10. Use the new component model (e.g. `cpp-application`, `cpp-library`, `swift-application`, `swift-library`, `xctest`) instead.

Base class that may be used for custom GeneralComponentSpec implementations. However, it is generally better to use an interface annotated with org.gradle.model.Managed and not use an implementation class at all.

## Constructors

BaseComponentSpec
Link copied to clipboard
constructor()

## Properties

identifier
Link copied to clipboard
val identifier: ComponentSpecIdentifier

## Functions

create
Link copied to clipboard
open fun <T : DefaultComponentSpec?> create(publicType: Class<out ComponentSpec>, implementationType: Class<T>, identifier: ComponentSpecIdentifier, modelNode: MutableModelNode): T
getBinaries
Link copied to clipboard
open fun getBinaries(): ModelMap<BinarySpec>
The variants produced for this component spec.
getDisplayName
Link copied to clipboard
abstract fun getDisplayName(): String
open fun getDisplayName(): String
Returns a human-consumable display name for this element.
getName
Link copied to clipboard
abstract fun getName(): String
open fun getName(): String
Returns the name of this element.
getProjectPath
Link copied to clipboard
abstract fun getProjectPath(): String
open fun getProjectPath(): String
The path to the project containing this component.
getSources
Link copied to clipboard
open fun getSources(): ModelMap<LanguageSourceSet>
The source sets for this component.
getVariants
Link copied to clipboard
open fun getVariants(): Iterable<Binary>
The variants of this component.
toString
Link copied to clipboard
open fun toString(): String