Skip to content

Commit c8c7b41

Browse files
committed
Add documentation
1 parent 73971f2 commit c8c7b41

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

userdocs/userdocs.docc/Articles/Features/automatic-task-creation.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ Add tasks for common operations with your Package.
55
For workspaces that contain a `Package.swift` file, the Swift extension adds the following tasks:
66

77
- **Build All**: Build all targets in the Package.
8-
- **Build Debug <Executable>**: Each executable in a Package.swift get a task for building a debug build.
9-
- **Build Release <Executable>**: Each executable in a Package.swift get a task for building a release build.
8+
- **Build Debug \<Executable\>**: Each executable product in a Package.swift get a task for building a debug build.
9+
- **Build Release \<Executable\>**: Each executable product in a Package.swift get a task for building a release build.
1010

1111
> 💡 Tip: Tasks use workflows common to all VS Code extensions. For more information see [the VS Code documentation for tasks](https://code.visualstudio.com/docs/editor/tasks).
1212
1313
These tasks are available via the commands **Terminal ▸ Run Task...** and **Terminal ▸ Run Build Task...** in the command palette.
14+
15+
## Create tasks for library targets
16+
17+
By default build tasks are only automatically created for executable products. If you set the `swift.createTasksForLibraryProducts` setting to true, then additional tasks will be created:
18+
- **Build Debug \<Library\>**: Each library product in a Package.swift get a task for building a debug build.
19+
- **Build Release \<Library\>**: Each library product in a Package.swift get a task for building a release build.
20+
21+
> ⚠️ Important: Tasks will not be created for automatic library products, as you cannot specify a `--product` option for automatic products when building.

0 commit comments

Comments
 (0)