<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "PackageDescription",
  "identifier" : "/documentation/PackageDescription/Target/sources",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "PackageDescription"
    ],
    "preciseIdentifier" : "s:18PackageDescription6TargetC7sourcesSaySSGSgvp"
  },
  "title" : "sources"
}
-->

# sources

The source files in this target.

```
final var sources: [String]?
```

## Discussion

If this property is `nil`, Swift Package Manager includes all valid source files in the
target’s path and treats specified paths as relative to the target’s
path.

A path can be a path to a directory or an individual source file. In
case of a directory, Swift Package Manager searches for valid source files recursively
inside it.

---

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)