<!--
{
  "availability" : [
    "SwiftPM: 5.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PackageDescription",
  "identifier" : "/documentation/PackageDescription/Target/PluginCapability-swift.enum/buildTool()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "PackageDescription"
    ],
    "preciseIdentifier" : "s:18PackageDescription6TargetC16PluginCapabilityO9buildToolAEyFZ"
  },
  "title" : "buildTool()"
}
-->

# buildTool()

The plug-in is a build tool.

```
static func buildTool() -> Target.PluginCapability
```

## Return Value

A plug-in capability that defines a build tool.

## Discussion

The plug-in to apply to each target that uses it, and creates commands
that run before or during the build of the target.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)